ci(release): two-run release pipeline (bump/build/sign, then tag) - #182
Merged
Merged
Conversation
Run 1 of the two-run release pipeline. Bumps the version, opens and merges its own bump PR, then builds and signs the AAB from the resulting merge sha and publishes it as a run artifact for the owner to upload to Play. Deliberately runs no pre-PR sweep: the bump diff is two lines, and every commit it carries was already swept by its own feature PR. The release-variant build (R8, resource shrinking, the Firebase guard, signing) is the gate this flow adds, because feature PRs only ever build debug.
Run 2 of the two-run release pipeline, dispatched by the owner once the .aab from run 1 is uploaded to Play — so the tag keeps meaning "this shipped", exactly as the manual process does today. Calls scripts/tag-release.ps1 unchanged; pwsh and gh are both preinstalled on ubuntu runners and the script shells out to nothing else. Passing the run id downloads that run's bundle first, so the script's "was this actually built" check is real rather than a warning.
Four terms the release workflow uses: `git diff --numstat` (the +2/-2 bump guard), setup-java's temurin distribution, keytool's -storepass on the pre-build keystore check, and bash elif in the Lesson 040 branch. Each is load-bearing — dropping them would mean a weaker guard or a worse check, which is the wrong trade against a dictionary entry. The IDE dictionary moves in the same commit so gate 6d stays green.
Adds elif, numstat, storepass and temurin so scripts/sync-ide-dictionary.py --check stays green alongside the cspell change.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.
Reviewed by Cursor Bugbot for commit 82e4221. Configure here.
| '-Version', '${{ inputs.version }}' | ||
| '-Sha', '${{ inputs.sha }}' | ||
| ) | ||
| if ('${{ inputs.title }}') { $tagArgs += @('-Title', '${{ inputs.title }}') } |
There was a problem hiding this comment.
Title quotes break tag step
Low Severity
The optional title input is interpolated into PowerShell single-quoted strings. An apostrophe in the title (for example a “What’s new” release name) closes the string early and fails the tag step after Play upload.
Reviewed by Cursor Bugbot for commit 82e4221. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Adds the release automation. Two workflows, both
workflow_dispatchonly — nothing runs on push or PR, and nothing here fires until you dispatch it.release.yml— run 1Reads the current
versionCode(never accepts it as input), bumps it, opens and merges its own bump PR, then builds and signs the AAB from the resulting merge sha and publishes it plus drafted notes as a run artifact. You download the.aaband upload it to Play.Guards it enforces rather than assumes:
versionNamemust equal1.0.<versionCode>before it will bump — if that convention ever breaks it stops instead of guessing a schemeapp/build.gradle.kts, or the run failsorigin/main, and the version at that sha must match what's being releasedkeytoolbefore spending fifteen minutes on R8, so bad signing material fails in secondsjarsigner -verifymust reportjar verifiedNo pre-PR sweep, deliberately. The bump diff is two lines; nothing in the sweep can be affected by changing an integer, and every commit the release carries was already swept on its own feature PR. What feature PRs never cover is the release variant — R8, resource shrinking, the Firebase guard from #178, signing — so the
bundleRelease+jarsignerpair is the gate this flow actually adds. Lesson 040 is detected and reported (dependency-catalog diff since the last tag) rather than silently skipped or falsely claimed.dry_run: truebuildsmainas it stands with no bump, PR or merge — use it for the first test.tag.yml— run 2Dispatched after the Play upload, so the tag keeps meaning this shipped rather than this built. Calls
scripts/tag-release.ps1unmodified — it shells out only togitandgh, and pwsh, gh and the JDK are all preinstalled on ubuntu runners. Passing the release run's id downloads that run's bundle first, which turns the script's "was this actually built" warning into a real check.When the Play upload is automated later, this becomes the tail of
release.ymland the two runs collapse into one. Nothing else about the design has to change.Before the first run
Secrets:
RELEASE_TOKEN,KEYSTORE_BASE64,KEYSTORE_PASSWORD,KEY_ALIAS,KEY_PASSWORD,GOOGLE_SERVICES_JSON.Known first-run risks
Neither has been executed yet — these are the places I'd expect a first failure:
compileSdk = 37may not be installable on the runner if 37 is still a preview SDK. If it fails, the fix is an explicit SDK install step, not a compileSdk change.baselineProfile(project(":baselineprofile"))is wired in, and if automatic generation during build is on,bundleReleasewill want a device the runner doesn't have. The default is off, so this should be fine — but it's the most likely surprise.Run it with
dry_run: truefirst. That exercises checkout, SDK, signing material, R8 andjarsignerwithout touchingmain, so a failure costs nothing but a run.🤖 Generated with Claude Code
https://claude.ai/code/session_01Miqsf1M14nY5TKiZHzyjNY
Note
High Risk
Introduces automation that uses release signing secrets, can admin-merge version bumps to
main, and gates production AAB output—misconfiguration or token scope issues could block releases or merge unintended bumps.Overview
Adds manual-only GitHub Actions release automation in two dispatched runs, so tags still mean “shipped to Play,” not merely “built.”
Run 1 (
release.yml) readsversionCode/versionNamefromapp/build.gradle.kts(no typed version input), enforces the1.0.<versionCode>convention, optionally bumps via an auto-opened/merged PR with a strict +2/−2 gradle diff check, pins a merge SHA onmain, restores signing +google-services.jsonfrom secrets, runs:app:bundleRelease, verifies withjarsigner, warns onlibs.versions.tomlchanges (Lesson 040), drafts note files, and uploads the signed.aabplus notes as artifacts.dry_runskips bump/PR/merge and builds currentmain.Run 2 (
tag.yml) runs after Play upload: optionally downloads the release run’s artifact, checks the bundle name/signature against the tagged SHA, then invokes existingscripts/tag-release.ps1to create the GitHub release. Sharedopenloop-releaseconcurrency limits overlapping release work.Dictionary/cspell entries were added for shell/workflow terms used in the YAML.
Reviewed by Cursor Bugbot for commit 82e4221. Bugbot is set up for automated code reviews on this repo. Configure here.