Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

ci(android): isolate native releases from production deployments (#8080)

Peter Chinman5c014766e56d
diff --git a/.github/workflows/release-android.yml b/.github/workflows/release-android.yml
new file mode 100644
index 0000000000..1fc8203891
--- /dev/null
+++ b/.github/workflows/release-android.yml
@@ -0,0 +1,230 @@
+name: Release Android App Bundle
+
+on:
+ workflow_dispatch:
+ inputs:
+ release_tag:
+ description: Published production release to build (vYYYY.M.D or vYYYY.M.D.N)
+ required: true
+ type: string
+ operation:
+ description: Release after deployment, or force a recovery build without uploading to Play
+ type: choice
+ default: rebuild
+ options:
+ - rebuild
+ - release
+ publish_android:
+ description: Recovery builds only — attach verified artifacts to the existing release
+ default: false
+ type: boolean
+
+# Android builds have their own cancellation lifecycle and never hold the
+# production deployment lock. Serialize them so release detection sees the
+# artifacts published by the preceding Android build.
+concurrency:
+ group: android-native-release
+ cancel-in-progress: false
+
+env:
+ MODE: "production"
+
+jobs:
+ android-changes:
+ name: Check for native Android changes
+ if: github.ref == 'refs/heads/main'
+ runs-on: ubuntu-24.04
+ permissions:
+ contents: read
+ timeout-minutes: 10
+ env:
+ RELEASE_TAG: ${{ inputs.release_tag }}
+ outputs:
+ build: ${{ steps.changes.outputs.build || steps.recovery.outputs.build }}
+ steps:
+ - name: Validate published release
+ env:
+ GH_TOKEN: ${{ github.token }}
+ shell: bash
+ run: |
+ set -euo pipefail
+ [[ "$RELEASE_TAG" =~ ^v20[0-9]{2}\.[0-9]{1,2}\.[0-9]{1,2}(\.[0-9]{1,2})?$ ]]
+ gh release view "$RELEASE_TAG" --repo "$GITHUB_REPOSITORY" --json isDraft,isPrerelease \
+ | jq -e '.isDraft == false and .isPrerelease == false'
+ - name: Allow explicit recovery build
+ id: recovery
+ if: inputs.operation == 'rebuild'
+ run: echo 'build=true' >> "$GITHUB_OUTPUT"
+ - name: Checkout release history
+ if: inputs.operation == 'release'
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
+ with:
+ ref: ${{ format('refs/tags/{0}', inputs.release_tag) }}
+ fetch-depth: 0
+ persist-credentials: false
+ - name: Compare Tauri with last published Android bundle
+ id: changes
+ if: inputs.operation == 'release'
+ env:
+ GH_TOKEN: ${{ github.token }}
+ run: node apps/web/scripts/android-release-needed.mjs
+
+ build-android:
+ name: Build signed Android App Bundle
+ needs: [android-changes]
+ if: needs.android-changes.outputs.build == 'true'
+ runs-on: ubuntu-24.04
+ permissions:
+ contents: read
+ timeout-minutes: 90
+ env:
+ CI: "true"
+ RELEASE_TAG: ${{ inputs.release_tag }}
+ steps:
+ - name: Checkout release
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
+ with:
+ ref: ${{ format('refs/tags/{0}', inputs.release_tag) }}
+ persist-credentials: false
+ - name: Install Android SDK components
+ shell: bash
+ run: |
+ set -euo pipefail
+ export JAVA_HOME="$JAVA_HOME_21_X64"
+ export PATH="$JAVA_HOME/bin:$PATH"
+ "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" \
+ 'platforms;android-36' 'build-tools;36.0.0' 'ndk;30.0.16248370'
+ echo "JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
+ echo "NDK_HOME=$ANDROID_HOME/ndk/30.0.16248370" >> "$GITHUB_ENV"
+ - name: Setup Nix
+ uses: ./.github/actions/setup-nix
+ - name: Setup prerequisites
+ uses: ./.github/actions/setup-reqs-web
+ - name: Prepare version and signing
+ id: metadata
+ working-directory: apps/web
+ env:
+ DOPPLER_TOKEN: ${{ secrets.ANDROID_RELEASE_DOPPLER_TOKEN }}
+ run: |
+ set -euo pipefail
+ filename=$(bun scripts/android-release.ts metadata "$RELEASE_TAG" "$RUNNER_TEMP/android-release.json")
+ echo "filename=$filename" >> "$GITHUB_OUTPUT"
+ bun scripts/android-release.ts signing "$RUNNER_TEMP/android-signing" \
+ tauri/src-tauri/gen/android/keystore.properties
+ bun scripts/android-firebase.ts build --doppler "$RUNNER_TEMP/android-google-services.json"
+ - name: Build production App Bundle
+ working-directory: apps/web
+ env:
+ VITE_SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY_PRODUCTION }}
+ VITE_POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
+ VITE_OTEL_EXPORTER_URL: https://macro-prox-prod.macroverse.workers.dev/i/otlp/v1/traces
+ VITE_OTEL_ENV: prod
+ run: |
+ set -euo pipefail
+ # The Nix environment is already loaded. Do not reload it in nested
+ # bash processes and re-enable its local-development sccache wrapper.
+ # This ephemeral runner has no compiler cache/server to reuse.
+ unset BASH_ENV
+ export RUSTC_WRAPPER=""
+ cargo tauri --version
+ # Tauri has shipped both switch-only and value-taking APK/AAB flags.
+ # Nix and local installations can differ; build only the AAB with either CLI.
+ android_help=$(cargo tauri android build --help)
+ artifact_args=(--aab)
+ if [[ "$android_help" == *'--apk <APK>'* ]]; then
+ artifact_args=(--apk false --aab true)
+ fi
+ just android-build --firebase-config "$RUNNER_TEMP/android-google-services.json" \
+ "${artifact_args[@]}" --ci --config "$RUNNER_TEMP/android-release.json" \
+ 2>&1 | tee "$RUNNER_TEMP/android-build.log"
+ - name: Preserve Android build log
+ if: always()
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
+ with:
+ name: android-build-log
+ path: ${{ runner.temp }}/android-build.log
+ if-no-files-found: warn
+ retention-days: 7
+ - name: Verify and collect App Bundle
+ working-directory: apps/web
+ env:
+ RELEASE_FILENAME: ${{ steps.metadata.outputs.filename }}
+ run: |
+ set -euo pipefail
+ curl --fail --location --retry 3 \
+ https://github.com/google/bundletool/releases/download/1.18.3/bundletool-all-1.18.3.jar \
+ --output "$RUNNER_TEMP/bundletool.jar"
+ echo "a099cfa1543f55593bc2ed16a70a7c67fe54b1747bb7301f37fdfd6d91028e29 $RUNNER_TEMP/bundletool.jar" | sha256sum --check
+ mapfile -t bundles < <(find tauri/src-tauri/gen/android/app/build/outputs/bundle -type f -name '*-release.aab')
+ if [ "${#bundles[@]}" -ne 1 ]; then
+ echo "Expected exactly one signed release AAB, found ${#bundles[@]}" >&2
+ exit 1
+ fi
+ bun scripts/android-bundle.ts "$RELEASE_TAG" "${bundles[0]}" \
+ "$RUNNER_TEMP/bundletool.jar" "$RUNNER_TEMP/android-signing/certificate-sha256"
+ # Recovery builds can check out older tags whose metadata names an APK.
+ bundle_filename="${RELEASE_FILENAME%.*}.aab"
+ mkdir -p "$GITHUB_WORKSPACE/android-artifacts"
+ cp "${bundles[0]}" "$GITHUB_WORKSPACE/android-artifacts/$bundle_filename"
+ # R8 mapping belongs to this exact binary; preserve it for Play crash reports.
+ bundle_variant=$(basename "$(dirname "${bundles[0]}")")
+ mapping="tauri/src-tauri/gen/android/app/build/outputs/mapping/$bundle_variant/mapping.txt"
+ if [[ ! -s "$mapping" ]]; then
+ echo "Missing R8 mapping for bundle variant $bundle_variant" >&2
+ exit 1
+ fi
+ mapping_filename="${bundle_filename%.aab}-mapping.txt"
+ cp "$mapping" "$GITHUB_WORKSPACE/android-artifacts/$mapping_filename"
+ \cd "$GITHUB_WORKSPACE/android-artifacts"
+ sha256sum "$bundle_filename" > "$bundle_filename.sha256"
+ sha256sum "$mapping_filename" > "$mapping_filename.sha256"
+ - name: Upload verified Android artifact
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
+ with:
+ name: android-release
+ path: android-artifacts/*
+ if-no-files-found: error
+ retention-days: 30
+ - name: Remove signing material
+ if: always()
+ run: |
+ rm -f apps/web/tauri/src-tauri/gen/android/keystore.properties \
+ apps/web/tauri/src-tauri/gen/android/app/google-services.json \
+ "$RUNNER_TEMP/android-google-services.json"
+ rm -rf "$RUNNER_TEMP/android-signing"
+ # This hosted runner has no separate /nix cache mount to detach. The cache
+ # teardown action's fuser -km /nix can kill the runner on its root filesystem.
+
+ upload-android:
+ name: Publish Android release artifact
+ needs: [build-android]
+ if: inputs.operation == 'release' || inputs.publish_android
+ runs-on: ubuntu-24.04
+ timeout-minutes: 30
+ permissions:
+ contents: write
+ actions: write
+ steps:
+ - name: Download verified Android artifact
+ uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
+ with:
+ name: android-release
+ path: android-artifacts
+ - name: Attach Android artifacts and checksums to release
+ uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65
+ with:
+ tag_name: ${{ inputs.release_tag }}
+ files: android-artifacts/*
+ fail_on_unmatched_files: true
+ - name: Release to Google Play internal testers
+ if: inputs.operation == 'release'
+ env:
+ GH_TOKEN: ${{ github.token }}
+ RELEASE_TAG: ${{ inputs.release_tag }}
+ run: |
+ set -euo pipefail
+ # Dispatch from main to retain the existing restricted Google OIDC identity.
+ gh workflow run publish-android-play.yml --repo "$GITHUB_REPOSITORY" --ref main \
+ -f operation=upload-internal -f release_tag="$RELEASE_TAG" -f status=completed
+ printf 'Queued Google Play internal testing upload for `%s`. Check the Publish Android to Google Play workflow for its result.\n' \
+ "$RELEASE_TAG" >> "$GITHUB_STEP_SUMMARY"
diff --git a/.github/workflows/release-production.yml b/.github/workflows/release-production.yml
index b3bd4ab95d..faaef4da5e 100644
--- a/.github/workflows/release-production.yml
+++ b/.github/workflows/release-production.yml
@@ -2,222 +2,35 @@ name: Deploy Production Release
on:
release:
types: [released]
- workflow_dispatch:
- inputs:
- release_tag:
- description: Existing published production release to rebuild Android for (vYYYY.M.D or vYYYY.M.D.N)
- required: true
- type: string
- publish_android:
- description: Attach verified Android App Bundle artifacts to the existing release
- default: false
- type: boolean
concurrency:
- group: ${{ github.workflow }}-${{ github.event_name == 'workflow_dispatch' && inputs.release_tag || 'production' }}
+ group: ${{ github.workflow }}-production
cancel-in-progress: false
env:
MODE: "production"
jobs:
- android-changes:
- name: Check for native Android changes
+ release-android:
+ name: Queue Android release
+ needs: [deploy, deploy-sync-service, deploy-ai-editing-worker]
runs-on: ubuntu-24.04
+ timeout-minutes: 5
permissions:
contents: read
- timeout-minutes: 10
- outputs:
- build: ${{ steps.changes.outputs.build || steps.recovery.outputs.build }}
- steps:
- - name: Allow explicit recovery build
- id: recovery
- if: github.event_name == 'workflow_dispatch'
- run: echo 'build=true' >> "$GITHUB_OUTPUT"
- - name: Checkout release history
- if: github.event_name == 'release'
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- with:
- fetch-depth: 0
- persist-credentials: false
- - name: Compare Tauri with last published Android bundle
- id: changes
- if: github.event_name == 'release'
- env:
- GH_TOKEN: ${{ github.token }}
- run: node apps/web/scripts/android-release-needed.mjs
-
- build-android:
- name: Build signed Android App Bundle
- needs: [android-changes]
- if: needs.android-changes.outputs.build == 'true'
- runs-on: ubuntu-24.04
- permissions:
- contents: read
- timeout-minutes: 90
- env:
- CI: "true"
- RELEASE_TAG: ${{ inputs.release_tag || github.event.release.tag_name }}
- steps:
- - name: Validate recovery release
- if: github.event_name == 'workflow_dispatch'
- env:
- GH_TOKEN: ${{ github.token }}
- shell: bash
- run: |
- set -euo pipefail
- [[ "$RELEASE_TAG" =~ ^v20[0-9]{2}\.[0-9]{1,2}\.[0-9]{1,2}(\.[0-9]{1,2})?$ ]]
- gh release view "$RELEASE_TAG" --repo "$GITHUB_REPOSITORY" --json isDraft,isPrerelease \
- | jq -e '.isDraft == false and .isPrerelease == false'
- - name: Checkout release
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- with:
- ref: ${{ inputs.release_tag && format('refs/tags/{0}', inputs.release_tag) || github.sha }}
- persist-credentials: false
- - name: Install Android SDK components
- shell: bash
- run: |
- set -euo pipefail
- export JAVA_HOME="$JAVA_HOME_21_X64"
- export PATH="$JAVA_HOME/bin:$PATH"
- "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" \
- 'platforms;android-36' 'build-tools;36.0.0' 'ndk;30.0.16248370'
- echo "JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
- echo "NDK_HOME=$ANDROID_HOME/ndk/30.0.16248370" >> "$GITHUB_ENV"
- - name: Setup Nix
- uses: ./.github/actions/setup-nix
- - name: Setup prerequisites
- uses: ./.github/actions/setup-reqs-web
- - name: Prepare version and signing
- id: metadata
- working-directory: apps/web
- env:
- DOPPLER_TOKEN: ${{ secrets.ANDROID_RELEASE_DOPPLER_TOKEN }}
- run: |
- set -euo pipefail
- filename=$(bun scripts/android-release.ts metadata "$RELEASE_TAG" "$RUNNER_TEMP/android-release.json")
- echo "filename=$filename" >> "$GITHUB_OUTPUT"
- bun scripts/android-release.ts signing "$RUNNER_TEMP/android-signing" \
- tauri/src-tauri/gen/android/keystore.properties
- bun scripts/android-firebase.ts build --doppler "$RUNNER_TEMP/android-google-services.json"
- - name: Build production App Bundle
- working-directory: apps/web
- env:
- VITE_SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY_PRODUCTION }}
- VITE_POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
- VITE_OTEL_EXPORTER_URL: https://macro-prox-prod.macroverse.workers.dev/i/otlp/v1/traces
- VITE_OTEL_ENV: prod
- run: |
- set -euo pipefail
- # The Nix environment is already loaded. Do not reload it in nested
- # bash processes and re-enable its local-development sccache wrapper.
- # This ephemeral runner has no compiler cache/server to reuse.
- unset BASH_ENV
- export RUSTC_WRAPPER=""
- cargo tauri --version
- # Tauri has shipped both switch-only and value-taking APK/AAB flags.
- # Nix and local installations can differ; build only the AAB with either CLI.
- android_help=$(cargo tauri android build --help)
- artifact_args=(--aab)
- if [[ "$android_help" == *'--apk <APK>'* ]]; then
- artifact_args=(--apk false --aab true)
- fi
- just android-build --firebase-config "$RUNNER_TEMP/android-google-services.json" \
- "${artifact_args[@]}" --ci --config "$RUNNER_TEMP/android-release.json" \
- 2>&1 | tee "$RUNNER_TEMP/android-build.log"
- - name: Preserve Android build log
- if: always()
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
- with:
- name: android-build-log
- path: ${{ runner.temp }}/android-build.log
- if-no-files-found: warn
- retention-days: 7
- - name: Verify and collect App Bundle
- working-directory: apps/web
- env:
- RELEASE_FILENAME: ${{ steps.metadata.outputs.filename }}
- run: |
- set -euo pipefail
- curl --fail --location --retry 3 \
- https://github.com/google/bundletool/releases/download/1.18.3/bundletool-all-1.18.3.jar \
- --output "$RUNNER_TEMP/bundletool.jar"
- echo "a099cfa1543f55593bc2ed16a70a7c67fe54b1747bb7301f37fdfd6d91028e29 $RUNNER_TEMP/bundletool.jar" | sha256sum --check
- mapfile -t bundles < <(find tauri/src-tauri/gen/android/app/build/outputs/bundle -type f -name '*-release.aab')
- if [ "${#bundles[@]}" -ne 1 ]; then
- echo "Expected exactly one signed release AAB, found ${#bundles[@]}" >&2
- exit 1
- fi
- bun scripts/android-bundle.ts "$RELEASE_TAG" "${bundles[0]}" \
- "$RUNNER_TEMP/bundletool.jar" "$RUNNER_TEMP/android-signing/certificate-sha256"
- # Recovery builds can check out older tags whose metadata names an APK.
- bundle_filename="${RELEASE_FILENAME%.*}.aab"
- mkdir -p "$GITHUB_WORKSPACE/android-artifacts"
- cp "${bundles[0]}" "$GITHUB_WORKSPACE/android-artifacts/$bundle_filename"
- # R8 mapping belongs to this exact binary; preserve it for Play crash reports.
- bundle_variant=$(basename "$(dirname "${bundles[0]}")")
- mapping="tauri/src-tauri/gen/android/app/build/outputs/mapping/$bundle_variant/mapping.txt"
- if [[ ! -s "$mapping" ]]; then
- echo "Missing R8 mapping for bundle variant $bundle_variant" >&2
- exit 1
- fi
- mapping_filename="${bundle_filename%.aab}-mapping.txt"
- cp "$mapping" "$GITHUB_WORKSPACE/android-artifacts/$mapping_filename"
- \cd "$GITHUB_WORKSPACE/android-artifacts"
- sha256sum "$bundle_filename" > "$bundle_filename.sha256"
- sha256sum "$mapping_filename" > "$mapping_filename.sha256"
- - name: Upload verified Android artifact
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
- with:
- name: android-release
- path: android-artifacts/*
- if-no-files-found: error
- retention-days: 30
- - name: Remove signing material
- if: always()
- run: |
- rm -f apps/web/tauri/src-tauri/gen/android/keystore.properties \
- apps/web/tauri/src-tauri/gen/android/app/google-services.json \
- "$RUNNER_TEMP/android-google-services.json"
- rm -rf "$RUNNER_TEMP/android-signing"
- # This hosted runner has no separate /nix cache mount to detach. The cache
- # teardown action's fuser -km /nix can kill the runner on its root filesystem.
-
- upload-android:
- name: Publish Android release artifact
- needs: [build-android, deploy, deploy-sync-service, deploy-ai-editing-worker]
- if: >-
- ${{ !cancelled() && needs.build-android.result == 'success' &&
- ((github.event_name == 'workflow_dispatch' && inputs.publish_android) ||
- (github.event_name == 'release' && needs.deploy.result == 'success' &&
- needs.deploy-sync-service.result == 'success' && needs.deploy-ai-editing-worker.result == 'success')) }}
- runs-on: ubuntu-24.04
- permissions:
- contents: write
actions: write
steps:
- - name: Download verified Android artifact
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
- with:
- name: android-release
- path: android-artifacts
- - name: Attach Android artifacts and checksums to release
- uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65
- with:
- tag_name: ${{ inputs.release_tag || github.event.release.tag_name }}
- files: android-artifacts/*
- fail_on_unmatched_files: true
- - name: Release to Google Play internal testers
- if: github.event_name == 'release'
+ - name: Dispatch independent Android workflow
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ github.event.release.tag_name }}
run: |
set -euo pipefail
- # Dispatch from main to retain the existing restricted Google OIDC identity.
- gh workflow run publish-android-play.yml --repo "$GITHUB_REPOSITORY" --ref main \
- -f operation=upload-internal -f release_tag="$RELEASE_TAG" -f status=completed
- printf 'Queued Google Play internal testing upload for `%s`. Check the Publish Android to Google Play workflow for its result.\n' \
+ # Do not wait for the native build: it must not hold this workflow's
+ # production concurrency lock or delay cancellation of this run.
+ gh workflow run release-android.yml --repo "$GITHUB_REPOSITORY" --ref main \
+ -f operation=release -f release_tag="$RELEASE_TAG"
+ printf 'Queued Android release for `%s`. Check the Release Android App Bundle workflow for build and publishing results.\n' \
"$RELEASE_TAG" >> "$GITHUB_STEP_SUMMARY"
deploy-cloud-storage:
diff --git a/docs/ANDROID_DEVELOPMENT.md b/docs/ANDROID_DEVELOPMENT.md
index 5f87bb4365..9c73668090 100644
--- a/docs/ANDROID_DEVELOPMENT.md
+++ b/docs/ANDROID_DEVELOPMENT.md
@@ -130,9 +130,17 @@ its fingerprint to production associations before testing Play-installed links.
### Production release artifacts
-`.github/workflows/release-production.yml` builds an ARM64 signed AAB from the
-release commit only when `apps/web/tauri/` differs from the closest ancestor
-release with a complete AAB, R8 mapping, and checksums. The first release without
+After web, cloud-storage, sync-service, and AI editing worker deployments succeed,
+`.github/workflows/release-production.yml` dispatches the independent
+`release-android.yml` workflow and does not wait for it. Android has its own
+concurrency group and cancellation lifecycle: a slow or canceled native build
+cannot hold the production deployment lock or delay the next deployment.
+Cancel an already-dispatched Android build from its own workflow run; canceling
+the production run does not cancel it.
+
+The Android workflow builds an ARM64 signed AAB from the selected release tag
+only when `apps/web/tauri/` differs from the closest ancestor release with a
+complete AAB, R8 mapping, and checksums. The first release without
such a baseline builds an AAB. Frontend-only releases skip native builds and Play
uploads; their app updates use the bundle updater. The comparison covers the
entire Tauri directory, including Android, iOS, Rust, and native config files.
@@ -204,22 +212,22 @@ separate roles.
Before publishing artifacts, CI verifies the signing certificate, package/version,
ARM64 ABI, and non-debuggable manifest, and checks the AAB structure
-with a checksum-pinned bundletool. Publishing
-waits for the web, cloud-storage, sync-service, and AI editing worker deployments. Android failures
-fail their job without blocking web/backend rollout. CI verification does not
-replace the device qualification described above.
+with a checksum-pinned bundletool. The automatic Android workflow starts after
+web/backend rollout succeeds. Build or publishing failures are reported on the
+Android workflow; the production workflow reports only whether dispatch succeeded.
+CI verification does not replace the device qualification described above.
To recover an Android artifact without redeploying production, manually run
-`release-production.yml` with `release_tag` set to an existing published
-production release. The source is checked out from that tag; web/backend jobs
-are skipped. `publish_android` defaults to false so the first run can validate
-the build and leave the files in the `android-release` Actions artifact. Set it to
+`release-android.yml` from `main` with `operation=rebuild` (the default) and
+`release_tag` set to an existing published production release. The source is
+checked out from that tag; this workflow has no web/backend deployment jobs.
+`publish_android` defaults to false so the first run can validate the build and leave the files in the `android-release` Actions artifact. Set it to
true to attach the verified artifacts and checksums to the selected release.
This explicit recovery path bypasses change detection and does not automatically
upload to Play:
```sh
-gh workflow run release-production.yml --ref main -f release_tag=v2026.9.30.0 -f publish_android=true
+gh workflow run release-android.yml --ref main -f operation=rebuild -f release_tag=v2026.9.30.0 -f publish_android=true
```
The Android job uses an ephemeral GitHub-hosted runner without a separate Nix
@@ -235,11 +243,13 @@ directly on a device.
### Google Play publishing
-`.github/workflows/publish-android-play.yml` runs from `main`. After a native
-release has passed verification, completed backend/web rollout, and attached its
-artifacts to GitHub, the production release workflow dispatches it automatically
-with `operation=upload-internal` and `status=completed`. Testers receive the new
-version subject to Google Play checks. Frontend-only releases do not dispatch it.
+`.github/workflows/publish-android-play.yml` runs from `main`. After successful
+backend/web rollout, the production workflow dispatches `release-android.yml`
+with `operation=release`. That independent workflow checks for native changes,
+builds and verifies the AAB, and attaches its artifacts to GitHub. It then
+dispatches the Play publishing workflow with `operation=upload-internal` and
+`status=completed`. Testers receive the new version subject to Google Play
+checks. Frontend-only releases do not dispatch the Play publishing workflow.
The separate workflow result reports whether the Play upload succeeded; queuing
it does not mean Play has accepted the release. Manual upload remains available
for recovery and Console-review drafts.