Update build #89
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Build | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
jobs: | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- name: Install Dependencies | |
run: flutter pub get | |
- name: Build Application | |
run: flutter build windows --release | |
- name: Upload Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Windows Artifact(Build) | |
path: build | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- name: Install Dependencies | |
run: |- | |
flutter pub get | |
sudo apt-get install clang cmake git ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev | |
- name: Build Application | |
run: flutter build linux --release | |
- name: Upload Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Linux Artifact(Build) | |
path: build | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- name: Install Dependencies | |
run: flutter pub get | |
- name: Build Application | |
run: flutter build macos --release | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: MacOS Artifact(Build) | |
path: build | |
dist-windows: | |
needs: | |
- build-windows | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- name: Install Dependencies | |
run: dart pub global activate flutter_distributor | |
- name: Setup Inno Setup 6 | |
shell: pwsh | |
run: |- | |
./asset/is.exe /VERYSLIENT | |
Copy-Item "./asset/ChineseSimplified.isl" -Destination "C:\Program Files (x86)\Inno Setup 6\Languages" | |
- name: Pack EXE Installer | |
run: |- | |
flutter_distributor package --platform windows --target exe | |
- name: Upload Dist Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Windows Artifact(Dist) | |
path: dist | |
dist-linux: | |
needs: | |
- build-linux | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- name: Install Dependencies | |
run: |- | |
sudo apt-get install clang cmake git ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev rpm patchelf locate libfuse2 | |
dart pub global activate flutter_distributor | |
flutter pub get | |
- name: Setup AppImageTool | |
run: |- | |
sudo mv asset/appimagetool-x86_64.AppImage /usr/local/bin/appimagetool | |
sudo chmod a+x /usr/local/bin/appimagetool | |
- name: Pack Installers | |
run: |- | |
flutter_distributor package --platform linux --targets appimage,deb,rpm | |
- name: Upload Dist Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Linux Artifact(Dist) | |
path: dist | |
dist-macos: | |
needs: | |
- build-macos | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
- name: Install Dependencies | |
run: |- | |
flutter pub get | |
npm install -g appdmg | |
dart pub global activate flutter_distributor | |
- name: Pack DMG Installer | |
run: |- | |
flutter_distributor package --platform macos --target dmg | |
- name: Upload Dist Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: MacOS Artifact(Dist) | |
path: dist |