Add Deploy Android workflow_dispatch button (signed AAB) #58

Open
opened 2026-07-29 04:07:40 -07:00 by westfarn · 0 comments
Owner

Summary

Add a manual Gitea "Deploy Android" button (workflow_dispatch), mirroring Deploy Prod: operator picks a SHA / runs the workflow → unit tests → signed release AAB (and later optional Play internal upload).

Web Deploy Prod stays web-static via server-infra/scripts/deploy.sh. Android is not nginx/node-static — keep it as a dedicated workflow that builds/signs (and optionally uploads to Play), not an extension of deploy.sh.

Depends on:


Current state

  • Deploy Prod = .gitea/workflows/deploy-prod.yml → tests → deploy.sh --app chat_web_app --env prod
  • Release build is manual today (ANDROID.md / android/README.md): build:mobile./gradlew bundleRelease with gitignored keystore.properties
  • No Gitea workflow for Android release

Target

Workflow Trigger Output
android-build.yml (#57) push → master debug APK (CI gate)
deploy-android.yml (this) workflow_dispatch only signed app-release.aab (+ optional Play)
deploy-prod.yml workflow_dispatch web prod (unchanged)

Work

1. New .gitea/workflows/deploy-android.yml

  • Name: Deploy Android
  • Trigger: workflow_dispatch: {} (optional inputs later: Play track internal / production)
  • Jobs:
    1. unit-tests — same pattern as Deploy Prod (npm ci + test:ci in llm-fe)
    2. deploy-android (needs tests):
      • Node 20 → npm cinpm run build:mobile
      • Wire signing from secrets dir (e.g. copy/link ~/Documents/secrets/chat_web_app/android/keystore.properties into place for the job — never commit)
      • cd android && ./gradlew bundleRelease --no-daemon
      • Upload app-release.aab as workflow artifact
      • Phase 2 (optional): upload to Play internal testing via service-account JSON

2. Versioning checklist / automation

Before each store release:

  • Bump versionCode (required) and versionName in android/app/build.gradle
  • Keep versionName aligned with package.json version

Either automate a bump step or document a pre-flight checklist in ANDROID.md so button presses don't fail Play upload on duplicate versionCode.

3. Optional npm helper

e.g. android:bundlebuild:mobile + gradlew bundleRelease for local parity with CI.

4. Docs

  • README: document Deploy Android next to Deploy Prod
  • ANDROID.md: point operators at the Gitea button; keep local signing steps for offline builds

5. Out of scope

  • Extending deploy.sh / Ansible host_apps for APK hosting
  • Auto-deploy Android on every master merge (CI debug job covers compile gate)
  • iOS / TestFlight (#21)

Coordination

  • Infra: server-infra#9
  • CI gate first: #57
  • Play Console listing / privacy / data-safety remain out-of-band ops (noted in #20)

Acceptance criteria

  • Gitea Actions shows Deploy Android as a runnable workflow (workflow_dispatch)
  • Run produces a signed app-release.aab artifact for the chosen ref
  • Unit tests gate the release job (same idea as Deploy Prod)
  • Keystore never committed; secrets loaded from host secrets path
  • Web Deploy Prod / Deploy Beta unchanged
  • README + ANDROID.md document the button
  • (Phase 2) AAB lands on Play internal testing track

References

## Summary Add a manual Gitea **"Deploy Android"** button (`workflow_dispatch`), mirroring **Deploy Prod**: operator picks a SHA / runs the workflow → unit tests → signed release **AAB** (and later optional Play internal upload). Web Deploy Prod stays web-static via `server-infra/scripts/deploy.sh`. Android is **not** nginx/`node-static` — keep it as a dedicated workflow that builds/signs (and optionally uploads to Play), not an extension of `deploy.sh`. Depends on: - Master Android CI (debug): [#57](https://git.aimloperations.com/ai_ml_operations/chat_web_app/issues/57) - Runner JDK/SDK + keystore secrets: [server-infra#9](https://git.aimloperations.com/ai_ml_operations/server-infra/issues/9) --- ## Current state - **Deploy Prod** = `.gitea/workflows/deploy-prod.yml` → tests → `deploy.sh --app chat_web_app --env prod` - Release build is manual today (`ANDROID.md` / `android/README.md`): `build:mobile` → `./gradlew bundleRelease` with gitignored `keystore.properties` - No Gitea workflow for Android release --- ## Target | Workflow | Trigger | Output | |----------|---------|--------| | `android-build.yml` (#57) | push → `master` | debug APK (CI gate) | | **`deploy-android.yml`** (this) | **`workflow_dispatch` only** | signed `app-release.aab` (+ optional Play) | | `deploy-prod.yml` | `workflow_dispatch` | web prod (unchanged) | --- ## Work ### 1. New `.gitea/workflows/deploy-android.yml` - **Name:** `Deploy Android` - **Trigger:** `workflow_dispatch: {}` (optional inputs later: Play track `internal` / `production`) - **Jobs:** 1. `unit-tests` — same pattern as Deploy Prod (`npm ci` + `test:ci` in `llm-fe`) 2. `deploy-android` (needs tests): - Node 20 → `npm ci` → `npm run build:mobile` - Wire signing from secrets dir (e.g. copy/link `~/Documents/secrets/chat_web_app/android/keystore.properties` into place for the job — never commit) - `cd android && ./gradlew bundleRelease --no-daemon` - Upload `app-release.aab` as workflow artifact - **Phase 2 (optional):** upload to Play **internal** testing via service-account JSON ### 2. Versioning checklist / automation Before each store release: - Bump `versionCode` (required) and `versionName` in `android/app/build.gradle` - Keep `versionName` aligned with `package.json` `version` Either automate a bump step or document a pre-flight checklist in `ANDROID.md` so button presses don't fail Play upload on duplicate versionCode. ### 3. Optional npm helper e.g. `android:bundle` → `build:mobile` + `gradlew bundleRelease` for local parity with CI. ### 4. Docs - README: document **Deploy Android** next to Deploy Prod - `ANDROID.md`: point operators at the Gitea button; keep local signing steps for offline builds ### 5. Out of scope - Extending `deploy.sh` / Ansible `host_apps` for APK hosting - Auto-deploy Android on every master merge (CI debug job covers compile gate) - iOS / TestFlight (#21) --- ## Coordination - Infra: [server-infra#9](https://git.aimloperations.com/ai_ml_operations/server-infra/issues/9) - CI gate first: [#57](https://git.aimloperations.com/ai_ml_operations/chat_web_app/issues/57) - Play Console listing / privacy / data-safety remain out-of-band ops (noted in #20) ## Acceptance criteria - [ ] Gitea Actions shows **Deploy Android** as a runnable workflow (`workflow_dispatch`) - [ ] Run produces a signed `app-release.aab` artifact for the chosen ref - [ ] Unit tests gate the release job (same idea as Deploy Prod) - [ ] Keystore never committed; secrets loaded from host secrets path - [ ] Web Deploy Prod / Deploy Beta unchanged - [ ] README + ANDROID.md document the button - [ ] (Phase 2) AAB lands on Play internal testing track ## References - Deploy Prod pattern: `.gitea/workflows/deploy-prod.yml` - Signing docs: `llm-fe/ANDROID.md`, `llm-fe/android/README.md` - Capacitor ship: #20 - Android CI on master: #57 - Infra: server-infra#9
westfarn added a new dependency 2026-07-29 04:15:02 -07:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Depends on
Reference: ai_ml_operations/chat_web_app#58