optimisation #5
This file contains hidden or 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
| name: Flutter Build CI | |
| on: | |
| push: | |
| branches: [ main, Dev ] | |
| pull_request: | |
| branches: [ main, Dev ] | |
| jobs: | |
| flutter-build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| flutter-version: ['3.38.9'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ matrix.flutter-version }} | |
| channel: 'stable' | |
| - name: Get dependencies | |
| run: flutter pub get | |
| - name: Run Flutter Analyze | |
| run: flutter analyze | |
| - name: Run Flutter Format Check | |
| run: dart format --set-exit-if-changed . | |
| continue-on-error: true | |
| - name: Build Web | |
| run: flutter build web --release | |
| - name: Upload Web Build | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: flutter-web-build | |
| path: ./build/web/ | |
| - name: Build APK | |
| run: flutter build apk --release | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: flutter-apk | |
| path: ./build/app/outputs/flutter-apk/app-release.apk | |
| - name: Build AAB (Android App Bundle) | |
| run: flutter build appbundle --release | |
| continue-on-error: true | |
| - name: Upload AAB | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: flutter-aab | |
| path: ./build/app/outputs/bundle/release/ | |
| continue-on-error: true | |
| - name: Build Linux Desktop | |
| run: flutter build linux --release | |
| continue-on-error: true | |
| - name: Upload Linux Build | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: flutter-linux-build | |
| path: ./build/linux/ | |
| continue-on-error: true |