The keystore used to be decoded into the environment of steps that run
repository code (scripts/gen-strings.mjs, the Gradle build), and the
workflow triggers on any android-v* tag, which can point at a commit
that was never reviewed. Split it the way linux.yml already splits
build and publish:
- apk: builds the unsigned APK from the repo, contents: read, no secrets
- sign: zipalign + apksigner over the artifact, keystore only, no repo code
- publish: gh release from the signed artifact, contents: write, no checkout
workflow_dispatch still yields the signed APK artifact without publishing;
an android-v* tag publishes the release as before.
Run by hand for a signed APK artifact, or push an android-v* tag to publish it in
a GitHub release (--latest=false, like Windows and Linux). The key comes from two
repository secrets (ANDROID_KEYSTORE_BASE64, ANDROID_KEYSTORE_PASSWORD, alias
"coucou"); the job refuses to build an unsigned release, checks the tag against
versionName and the signature with apksigner, and keeps mapping.txt as an artifact.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vx8hBz7xZHraAM2BEZfaXQ