156 lines
3.9 KiB
YAML
156 lines
3.9 KiB
YAML
name: Build All Platforms
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-windows:
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: '3.19.0'
|
|
|
|
- name: Get dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Build Windows EXE
|
|
run: flutter build windows --release
|
|
|
|
- name: Create ZIP
|
|
run: |
|
|
cd build/windows/runner/Release
|
|
Compress-Archive -Path * -DestinationPath ../../../mobile-eda-windows-x64.zip
|
|
cd ../../../
|
|
|
|
- name: Upload Windows Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: windows-x64
|
|
path: build/mobile-eda-windows-x64.zip
|
|
|
|
- name: Upload to Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: build/mobile-eda-windows-x64.zip
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
|
|
build-android:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: '3.19.0'
|
|
|
|
- name: Get dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Build Android APK
|
|
run: flutter build apk --release
|
|
|
|
- name: Upload Android Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: android-apk
|
|
path: build/app/outputs/flutter-apk/app-release.apk
|
|
|
|
- name: Upload to Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: build/app/outputs/flutter-apk/app-release.apk
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
|
|
build-linux:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: '3.19.0'
|
|
|
|
- name: Install Linux dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev
|
|
|
|
- name: Get dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Build Linux
|
|
run: flutter build linux --release
|
|
|
|
- name: Create TAR.GZ
|
|
run: |
|
|
cd build/linux/x64/release/bundle
|
|
tar -czf ../../../../../mobile-eda-linux-x64.tar.gz *
|
|
cd ../../../
|
|
|
|
- name: Upload Linux Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: linux-x64
|
|
path: build/mobile-eda-linux-x64.tar.gz
|
|
|
|
- name: Upload to Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: build/mobile-eda-linux-x64.tar.gz
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
|
|
build-web:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: '3.19.0'
|
|
|
|
- name: Get dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Build Web
|
|
run: flutter build web --release
|
|
|
|
- name: Create ZIP
|
|
run: |
|
|
cd build/web
|
|
zip -r ../../mobile-eda-web.zip *
|
|
cd ../../
|
|
|
|
- name: Upload Web Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: web
|
|
path: build/mobile-eda-web.zip
|
|
|
|
- name: Upload to Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: build/mobile-eda-web.zip
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|