chore: Polish our code, fix typos, update readme #48
Workflow file for this run
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: "[CodeCheck] Flutter - Android" | |
| on: | |
| pull_request: | |
| types: [opened, edited, reopened, synchronize] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| # You need to uncomment [Setup - Flutter Actions with Cache] when you want to use | |
| # different runner then our internal M1 flutter-builds runner. | |
| env: | |
| java_version: "17" | |
| jobs: | |
| codestyle-check-android: | |
| name: Project CodeCheck | |
| runs-on: ubuntu-latest | |
| # runs-on: [self-hosted, macOS, flutter-builds] # use this for self-hosted runners | |
| timeout-minutes: 25 | |
| steps: | |
| - name: '[Setup - Checkout]' | |
| uses: actions/checkout@v4.2.1 | |
| - name: '[Setup - Java]' | |
| uses: actions/setup-java@v4.4.0 | |
| with: | |
| distribution: 'zulu' | |
| java-version: ${{ env.java_version }} | |
| # Install Flutter SDK | |
| - name: '[Setup - Flutter SDK]' | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| flutter-version-file: .fvmrc | |
| cache: false | |
| architecture: x64 | |
| # Make sure we have latest FVM | |
| - name: '[FVM - Install]' | |
| run: dart pub global activate fvm | |
| # Install and select the Flutter version pinned in .fvmrc | |
| - name: '[FVM - Install version]' | |
| run: | | |
| fvm install | |
| fvm use | |
| # Install sops | |
| - name: '[Secrets - Setup SOPS]' | |
| uses: nhedger/setup-sops@v2 | |
| # Load secrets | |
| - name: '[Secrets - Generate keystore and properties]' | |
| env: | |
| SECRETS_ENCRYPT_KEY: ${{ secrets.SECRETS_ENCRYPT_KEY }} | |
| RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }} | |
| RELEASE_PROPERTIES: ${{ secrets.RELEASE_PROPERTIES }} | |
| FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT: ${{ secrets.FIREBASE_STG_APP_DISTRIBUTION_SERVICE_ACCOUNT }} | |
| run: ./extras/secrets/tools/load-secrets.sh | |
| # Make gen | |
| - name: '[Flutter - Generate code]' | |
| run: make gen | |
| # Run linter | |
| - name: '[Flutter - Run Linter]' | |
| run: fvm flutter analyze | |
| # Build is slightly faster when targeting single platform, debug version and only apk instead of appbundle | |
| - name: '[Flutter - Build APK]' | |
| run: fvm flutter build apk -t lib/main_staging.dart --flavor staging --target-platform android-arm64 --obfuscate --split-debug-info=build/app/outputs/symbols --debug | |
| # Only on self hosted. Cleanup the files after the build | |
| # - name: '[Finish - Cleanup]' | |
| # run: | | |
| # rm -rf ./* || true | |
| # rm -rf ./.??* || true |