Add Flutter CI workflow for main branch
This commit is contained in:
@@ -0,0 +1,45 @@
|
|||||||
|
name: Flutter Main CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze-and-build-all:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Flutter
|
||||||
|
uses: subosito/flutter-action@v2
|
||||||
|
with:
|
||||||
|
flutter-version: 'stable'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: flutter pub get
|
||||||
|
|
||||||
|
- name: Flutter analyze
|
||||||
|
run: flutter analyze
|
||||||
|
|
||||||
|
- name: Build Android APK
|
||||||
|
run: flutter build apk --release
|
||||||
|
|
||||||
|
- name: Build Web
|
||||||
|
run: flutter build web --release
|
||||||
|
|
||||||
|
- name: Build Linux
|
||||||
|
run: flutter build linux --release
|
||||||
|
|
||||||
|
- name: Build Windows
|
||||||
|
run: flutter build windows --release
|
||||||
|
|
||||||
|
- name: Build iOS (only macOS runners)
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
run: flutter build ios --release
|
||||||
|
|
||||||
|
- name: Build macOS (only macOS runners)
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
run: flutter build macos --release
|
||||||
Reference in New Issue
Block a user