This repository was archived by the owner on Aug 5, 2026. It is now read-only.
chore(deps): bump the flutter-dependencies group across 1 directory with 9 updates #1197
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: Android APK Build | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| types: [opened, synchronize, reopened, labeled] | |
| workflow_dispatch: | |
| jobs: | |
| check-team: | |
| name: Check Core Contributor | |
| if: >- | |
| github.event_name == 'pull_request' | |
| && contains(github.event.pull_request.labels.*.name, 'apk') | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| outputs: | |
| is-member: ${{ steps.check.outputs.is-member }} | |
| steps: | |
| - name: Checkout contributors list | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.base.sha }} | |
| sparse-checkout: .github/apk-contributors | |
| sparse-checkout-cone-mode: false | |
| - name: Check contributor membership | |
| id: check | |
| env: | |
| PR_AUTHOR: ${{ github.event.pull_request.user.login }} | |
| run: | | |
| if grep -qxF "$PR_AUTHOR" .github/apk-contributors; then | |
| echo "is-member=true" >> "$GITHUB_OUTPUT" | |
| echo "✅ ${PR_AUTHOR} is an APK contributor" | |
| else | |
| echo "is-member=false" >> "$GITHUB_OUTPUT" | |
| echo "⏭️ ${PR_AUTHOR} is not an APK contributor — skipping APK build" | |
| fi | |
| build-apk: | |
| name: Build Staging APK | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 90 | |
| needs: [check-team] | |
| env: | |
| ARTIFACT_SUFFIX: unknown | |
| # Run when: push/dispatch (not a PR, check-team was skipped), or PR where | |
| # the "apk" label is present and actor is a contributor. | |
| if: >- | |
| always() | |
| && ( | |
| (github.event_name != 'pull_request' && needs.check-team.result == 'skipped') | |
| || needs.check-team.outputs.is-member == 'true' | |
| ) | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| cache: 'gradle' | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.41.4' | |
| channel: 'stable' | |
| cache: true | |
| - name: Cache Flutter dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.pub-cache | |
| ${{ github.workspace }}/.pub-cache | |
| key: ${{ runner.os }}-pub-cache-${{ hashFiles('**/pubspec.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pub-cache- | |
| - name: Cache pre-built Android native libraries | |
| id: jnilibs-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: android/app/src/main/jniLibs | |
| key: ${{ runner.os }}-jnilibs-${{ hashFiles('rust/Cargo.toml', 'rust/Cargo.lock', 'rust/src/**', 'scripts/build_android.sh', 'scripts/build_openssl_android.sh', 'scripts/setup_android_config.sh') }} | |
| # ── Rust build steps (skipped when native libs are cached) ── | |
| - name: Setup Rust | |
| if: steps.jnilibs-cache.outputs.cache-hit != 'true' | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-linux-android,armv7-linux-androideabi,x86_64-linux-android | |
| - name: Cache Rust dependencies | |
| if: steps.jnilibs-cache.outputs.cache-hit != 'true' | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| rust/target | |
| key: ${{ runner.os }}-cargo-android-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-android- | |
| - name: Cache OpenSSL for Android | |
| if: steps.jnilibs-cache.outputs.cache-hit != 'true' | |
| uses: actions/cache@v4 | |
| with: | |
| path: rust/target/openssl/install | |
| key: ${{ runner.os }}-openssl-android-${{ hashFiles('scripts/build_openssl_android.sh') }} | |
| - name: Cache Android SDK & NDK | |
| id: android-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| /usr/local/lib/android/sdk/ndk/27.0.12077973 | |
| /usr/local/lib/android/sdk/build-tools | |
| /usr/local/lib/android/sdk/platforms | |
| key: ${{ runner.os }}-android-ndk-27.0.12077973 | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| - name: Install Android NDK | |
| if: steps.android-cache.outputs.cache-hit != 'true' | |
| run: echo "y" | sdkmanager --install "ndk;27.0.12077973" | |
| - name: Set NDK environment | |
| if: steps.jnilibs-cache.outputs.cache-hit != 'true' | |
| run: echo "ANDROID_NDK_HOME=$ANDROID_HOME/ndk/27.0.12077973" >> $GITHUB_ENV | |
| - name: Install Flutter dependencies | |
| run: flutter pub get | |
| - name: Write staging signing config | |
| env: | |
| ANDROID_STAGING_KEYSTORE_B64: ${{ secrets.ANDROID_STAGING_KEYSTORE_B64 }} | |
| ANDROID_STAGING_STORE_PASSWORD: ${{ secrets.ANDROID_STAGING_STORE_PASSWORD }} | |
| ANDROID_STAGING_KEY_ALIAS: ${{ secrets.ANDROID_STAGING_KEY_ALIAS }} | |
| ANDROID_STAGING_KEY_PASSWORD: ${{ secrets.ANDROID_STAGING_KEY_PASSWORD }} | |
| run: | | |
| test -n "$ANDROID_STAGING_KEYSTORE_B64" || { echo "Missing secret: ANDROID_STAGING_KEYSTORE_B64"; exit 1; } | |
| test -n "$ANDROID_STAGING_STORE_PASSWORD" || { echo "Missing secret: ANDROID_STAGING_STORE_PASSWORD"; exit 1; } | |
| test -n "$ANDROID_STAGING_KEY_ALIAS" || { echo "Missing secret: ANDROID_STAGING_KEY_ALIAS"; exit 1; } | |
| test -n "$ANDROID_STAGING_KEY_PASSWORD" || { echo "Missing secret: ANDROID_STAGING_KEY_PASSWORD"; exit 1; } | |
| mkdir -p android | |
| printf '%s' "$ANDROID_STAGING_KEYSTORE_B64" | base64 --decode > android/staging.keystore | |
| printf 'storeFile=staging.keystore\nstorePassword=%s\nkeyAlias=%s\nkeyPassword=%s\n' \ | |
| "$ANDROID_STAGING_STORE_PASSWORD" \ | |
| "$ANDROID_STAGING_KEY_ALIAS" \ | |
| "$ANDROID_STAGING_KEY_PASSWORD" \ | |
| > android/key-staging.properties | |
| - name: Build Rust libraries for Android | |
| if: steps.jnilibs-cache.outputs.cache-hit != 'true' | |
| run: ./scripts/build_android.sh | |
| - name: Build staging APK | |
| run: flutter build apk --flavor staging --split-per-abi --build-number=${{ github.run_number }} | |
| - name: Set artifact name | |
| env: | |
| EVENT_NAME: ${{ github.event_name }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV | |
| if [ "$EVENT_NAME" = "pull_request" ]; then | |
| echo "ARTIFACT_SUFFIX=pr-${PR_NUMBER}-${GITHUB_SHA::7}" >> $GITHUB_ENV | |
| else | |
| BRANCH_NAME="${GITHUB_REF_NAME//\//-}" | |
| echo "ARTIFACT_SUFFIX=${BRANCH_NAME}-${GITHUB_SHA::7}" >> $GITHUB_ENV | |
| fi | |
| - name: Upload APK artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: apk-staging-${{ env.ARTIFACT_SUFFIX }} | |
| path: build/app/outputs/flutter-apk/*-staging-*.apk | |
| retention-days: 30 | |
| if-no-files-found: error | |
| - name: Summary | |
| env: | |
| SAFE_PR_TITLE: ${{ github.event.pull_request.title }} | |
| SAFE_PR_NUMBER: ${{ github.event.pull_request.number }} | |
| EVENT_NAME: ${{ github.event_name }} | |
| COMMIT_SHA: ${{ github.sha }} | |
| ARTIFACT_SUFFIX: ${{ env.ARTIFACT_SUFFIX }} | |
| run: | | |
| if [ "$EVENT_NAME" = "pull_request" ]; then | |
| PR_INFO="**PR:** #${SAFE_PR_NUMBER} — ${SAFE_PR_TITLE}" | |
| else | |
| PR_INFO="" | |
| fi | |
| cat >> "${GITHUB_STEP_SUMMARY}" <<SUMMARY | |
| ## Android APK Build Complete | |
| **Commit:** ${COMMIT_SHA} | |
| ${PR_INFO} | |
| ### Download APKs | |
| 1. Go to the **Actions** tab | |
| 2. Click on this workflow run | |
| 3. Scroll down to **Artifacts** | |
| 4. Download **apk-staging-${ARTIFACT_SUFFIX}** | |
| ### APK Files | |
| SUMMARY | |
| ls -la build/app/outputs/flutter-apk/*-staging-*.apk >> "${GITHUB_STEP_SUMMARY}" 2>/dev/null || echo "APK listing not available" >> "${GITHUB_STEP_SUMMARY}" |