74 lines
2.0 KiB
YAML
74 lines
2.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-linux:
|
|
name: Build for Linux
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
- name: Set up Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: '3.1.3'
|
|
- run: flutter config --enable-linux-desktop
|
|
- run: flutter pub get
|
|
- name: Build for Linux
|
|
run: flutter build linux
|
|
- name: Archive Linux Artifact
|
|
uses: actions/upload-artifact@master
|
|
with:
|
|
name: linux-build
|
|
path: build/x64/release/bundle
|
|
|
|
build-android:
|
|
name: Build for Android
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
- name: Set up Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: '3.1.3'
|
|
- uses: actions/setup-java@v2
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: '11'
|
|
- run: flutter config --enable-android
|
|
- run: flutter pub get
|
|
- run: flutter build apk
|
|
- run: flutter build appbundle
|
|
- name: Archive Android Artifact
|
|
uses: actions/upload-artifact@master
|
|
with:
|
|
name: android-build
|
|
path: |
|
|
build/app/outputs/flutter-apk/app-release.apk
|
|
build/app/outputs/bundle/release/app-release.aab
|
|
|
|
build-and-publish-web:
|
|
name: Build and Publish for Web
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
- name: Set up Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: '3.1.3'
|
|
- name: Enable flutter web
|
|
run: flutter config --enable-web
|
|
- name: Get dependencies
|
|
run: flutter pub get
|
|
- name: Build for Web
|
|
run: flutter build web
|
|
- name: Publish to GitHub Pages
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: build/web
|