build: publish tagged builds to Play internal testing
CI / build (push) Successful in 12m22s
CI / play (push) Successful in 3m19s

Apply Gradle Play Publisher 3.13.0 to the Android target, target the
internal track with AUTO version codes, and add a tag-only CI job that
decodes the upload keystore and uploads with the service account JSON
from repository secrets.

Document the one-time service account and secret setup.
This commit is contained in:
TapTap committed 2026-11-15 19:11:38 +00:00
1 parent 0491c78c7f
commit d9976a62bd
4 files changed
+90 -5

No files matched your search

+30 -5
View File
@@ -140,12 +140,37 @@ integrity → Google-generated key**, upload the AAB, add release notes, then
**Save → Roll out**. The first upload enrolls the app in Play App Signing. Share
the opt-in link from the Testers tab with your test list.
### 4. Automated uploads (later)
### 4. Automated uploads
Create a service account in Google Cloud, enable the **Google Play Android
Developer API**, and grant the service account release permissions for this app
in Play Console. Then wire Gradle Play Publisher with the service account JSON.
The first AAB must still be uploaded manually.
Tagged builds (`v*`) publish to internal testing from CI. One-time setup:
1. In Google Cloud, enable the **Google Play Android Developer API**.
2. Create a service account and download a JSON key.
3. In Play Console → **Users and permissions → Invite new user**, add the
service account's `client_email`, give it access to this app with
**Release to testing tracks** and **View app information** (do not grant
production or admin access).
4. Add these repository secrets in Gitea:
| Secret | Value |
| --- | --- |
| `ANDROID_KEYSTORE_BASE64` | `base64 -w0 upload-keystore.jks` |
| `ANDROID_KEYSTORE_PASSWORD` | keystore password |
| `ANDROID_KEY_ALIAS` | `upload` |
| `ANDROID_KEY_PASSWORD` | key password |
| `PLAY_SERVICE_ACCOUNT_JSON` | contents of the service account JSON |
Then `git tag v0.2.0 && git push --tags` builds, signs and uploads the bundle.
Gradle Play Publisher asks Play for the next free `versionCode`
(`ResolutionStrategy.AUTO`), so only the tag/version name needs to change.
Local equivalent (takes the JSON from an environment variable, never a file in
the repo):
```bash
ANDROID_PUBLISHER_CREDENTIALS="$(cat ~/play-service-account.json)" \
ANDROID_HOME=/opt/android-sdk gradle :composeApp:publishBundle
```
## App state and offline behaviour