ci: run dart doc and pana before building APK #331
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: Build Example App | |
| on: | |
| push: | |
| branches: [master, develop] | |
| pull_request: | |
| branches: [master, develop] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| if: ${{ !contains(github.event.head_commit.message, 'ci skip') }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| variant: [debug, release] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| cache: true | |
| - run: dart pub get | |
| - run: dart format --output=none --set-exit-if-changed . | |
| - run: dart analyze | |
| - run: flutter pub get | |
| working-directory: example/ | |
| #- run: flutter test | |
| - run: dart doc | |
| - name: Upload generated dartdoc | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs | |
| path: doc/ | |
| - name: Evaluate score with pana | |
| run: | | |
| dart pub global activate pana | |
| dart pub global run pana . | |
| - run: flutter build apk --${{ matrix.variant }} --verbose | |
| working-directory: example/ | |
| - uses: actions/upload-artifact@v5 | |
| with: | |
| name: example-apk-${{ matrix.variant }} | |
| path: | | |
| example/build/app/outputs/flutter-apk/app-${{ matrix.variant }}.apk | |
| example/build/reports/* | |
| build-ios: | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| variant: [debug, release] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| cache: true | |
| - run: flutter pub get | |
| working-directory: example/ | |
| - run: flutter build ios --${{ matrix.variant }} --verbose --no-codesign | |
| working-directory: example/ |