Skip to content

Add Android release matrix + PR CI workflow#26

Merged
jakeledwards merged 2 commits into
mainfrom
feat/android-ci-workflows
Jun 9, 2026
Merged

Add Android release matrix + PR CI workflow#26
jakeledwards merged 2 commits into
mainfrom
feat/android-ci-workflows

Conversation

@jakeledwards

Copy link
Copy Markdown
Owner

Summary

Phase 3 of the Android build pipeline (per spec and plan).

  • Extended .github/workflows/release.yml with an android matrix entry that builds a signed APK (attached to the GitHub Release) and a signed AAB (uploaded as a production-track draft to Play Console for com.claw.control). Existing mac/win/linux jobs unchanged in behavior — only the build step gained an if: matrix.platform != 'android' guard.
  • Added .github/workflows/android-ci.yml: a fork-safe PR check that compiles assembleDebug and uploads the APK as a 7-day workflow artifact. No secrets exposed; debug build only.

Both workflows use JDK 21 (Capacitor 8's @capacitor/geolocation requires JavaVersion.VERSION_21).

Secrets (all 5 are populated in this repo)

  • ANDROID_KEYSTORE_BASE64 — base64-encoded upload keystore
  • ANDROID_KEYSTORE_PASSWORD, ANDROID_KEY_ALIAS, ANDROID_KEY_PASSWORD — signing creds
  • PLAY_SERVICE_ACCOUNT_JSON — Play Developer API service-account JSON (analytics@still-protocol-486316-c0.iam.gserviceaccount.com)

Play upload flow

  • Play upload step uses continue-on-error: true so a Play API hiccup never strands the APK (which is already attached to the GitHub Release at that point).
  • On Play upload failure: the AAB is attached to the workflow run as aab-fallback-<tag> (14-day retention) for manual upload, and a final step exit 1s so the run shows red.
  • Production track + draft status — nothing reaches end users until you click Submit for review in Play Console.

Test plan

  • android-ci.yml runs on this PR (it modifies .github/workflows/android-ci.yml, a triggering path) and uploads a app-debug-<PR#>.apk artifact.
  • After merge, dry-run release.yml via gh workflow run release.yml --ref main -f tag=v1.8.0 and verify:
    • APK lands on the v1.8.0 GitHub Release as ClawControl-1.8.0.apk.
    • Play Console → com.claw.control → Production shows a new draft release with versionCode 10800 and versionName 1.8.0.
  • Discard the Play Console draft after the dry-run.

🤖 Generated with Claude Code

Jake Edwards added 2 commits June 9, 2026 11:18
- Adds android matrix entry alongside mac/win/linux.
- Gates the existing desktop build step with if: matrix.platform != 'android'.
- Adds JDK 21 + Android SDK + Gradle cache setup (Capacitor 8 plugins
  like @capacitor/geolocation require JavaVersion.VERSION_21).
- Decodes the keystore from ANDROID_KEYSTORE_BASE64 secret.
- Runs set-android-version.js before mobile:sync so versionCode is correct.
- Builds release APK + AAB with signing creds from secrets.
- Renames APK to ClawControl-X.Y.Z.apk before the existing
  softprops/action-gh-release@v2 step picks it up.
- Uploads AAB to Play Console production track as draft via
  r0adkll/upload-google-play@v1. continue-on-error so a Play hiccup
  doesn't strand the APK; explicit fail-job step keeps run status
  honest; AAB attached to workflow run as fallback artifact.
Triggers on PRs touching android-relevant paths (android/**,
capacitor.config.ts, vite.config.mobile.ts, the two helper scripts,
package.json/lock, src/**, plugins/capacitor-native-websocket/**,
and this workflow file itself).

No secrets exposed (debug build only, fork-safe). Uploads
app-debug.apk as a 7-day workflow artifact for manual smoke-testing
from the PR. Concurrency group cancels older runs on force-push.
@jakeledwards jakeledwards merged commit 6921591 into main Jun 9, 2026
1 check passed
@jakeledwards jakeledwards deleted the feat/android-ci-workflows branch June 9, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant