Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix workflow #4

Merged
merged 20 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 64 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ on:


jobs:
build-abi:
uses: ./.github/workflows/abi.yml

build-apk:
needs: build-abi
runs-on: ubuntu-latest

steps:
Expand All @@ -18,25 +14,72 @@ jobs:

- name: Set up Flutter SDK
uses: subosito/[email protected]

- name: Download rust abi from artifact
uses: actions/[email protected]
with:
name: android-abi
channel: stable
cache: true

- name: Set up rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Test Abi
- name: Build Prepare
run: |
echo "Testing abi"
ls .
flutter pub get
chmod +x ./rust_builder

# - name: Build APK
- name: Build APK
run: |
flutter build apk
ls -alh ./build/app/outputs/flutter-apk/*.apk
cp -r ./build/app/outputs/flutter-apk /tmp/flutter-apk

# - name: Build Linux
# run: |
# flutter build apk --release
# ls -alh ./build/app/outputs/flutter-apk/*.apk
# cp -r ./build/app/outputs/flutter-apk /tmp/flutter-apk

# - name: Upload artifact
# uses: actions/upload-artifact@v2
# with:
# name: flutter-apk
# path: /tmp/flutter-apk/*.apk
# flutter build linux --release
# ls -alh ./build/linux/x64/release/bundle/*
# cp -r ./build/linux/x64/release/bundle /tmp/linux-bundle

- name: Upload Android
uses: actions/[email protected]
with:
name: android-release
path: /tmp/flutter-apk/*.apk

build-windows:
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Flutter SDK
uses: subosito/[email protected]
with:
channel: stable
cache: true

- name: Set up rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Build Prepare
run: |
flutter pub get
flutter config --enable-native-assets

- name: Build Windows
run: |
flutter build windows --release

- name: Build iss script
run: |
dart setup.dart
ls build\windows

- name: Upload Windows
uses: actions/[email protected]
with:
name: windows-release
path: build\windows\localsend_rs-setup.exe
Binary file added assets/icon/logo.ico
Binary file not shown.
16 changes: 16 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.1.4"
innosetup:
dependency: "direct dev"
description:
name: innosetup
sha256: "9bc0e1bc3df9c8fbbbc74d801ae1a650cdbe62de72fa0bb13c9f16f6a9e45e83"
url: "https://pub.dev"
source: hosted
version: "0.1.3"
integration_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -1008,6 +1016,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
version:
dependency: transitive
description:
name: version
sha256: "3d4140128e6ea10d83da32fef2fa4003fccbf6852217bb854845802f04191f94"
url: "https://pub.dev"
source: hosted
version: "3.0.2"
vm_service:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ dev_dependencies:
riverpod_lint: ^2.3.7
slang_build_runner: ^3.28.0
flutter_launcher_icons: "^0.13.1"
innosetup: ^0.1.3

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down
Empty file modified rust_builder/cargokit/run_build_tool.sh
100644 → 100755
Empty file.
28 changes: 28 additions & 0 deletions setup.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import 'dart:io';

import 'package:innosetup/innosetup.dart';
import 'package:version/version.dart';

void main() {
InnoSetup(
app: InnoSetupApp(
name: 'localsend_rs',
version: Version.parse('0.1.0'),
publisher: 'tomzds9@gihub',
urls: InnoSetupAppUrls(
homeUrl: Uri.parse('https://github.com/tom8zds/localsend_rs'),
),
),
files: InnoSetupFiles(
executable: File('build/windows/x64/runner/Release/localsend_rs.exe'),
location: Directory('build/windows/x64/runner/Release/'),
),
name: const InnoSetupName('localsend_rs-setup'),
location: InnoSetupInstallerDirectory(
Directory('build/windows'),
),
icon: InnoSetupIcon(
File('assets/icon/logo.ico'),
),
).make();
}
Loading