feat: sign release builds and add a release skill - #38
Merged
Conversation
The four KEYSTORE_*/KEY_* constants were already present in local.properties but nothing read them, so assembleRelease produced an unsigned APK. Read them through providers.fileContents rather than a plain file read: the configuration cache is enabled, and a config-time File.inputStream() is an untracked input, so editing local.properties would otherwise leave a stale cached configuration behind. The null guard keeps CI green, where no local.properties exists. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Bumps Android and iOS versions together on a release branch, opens a PR since main is protected, then tags the merge commit and publishes a GitHub release with the signed APK attached. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Summary
Worn had no release process: one tag (
v0.1.0), no GitHub releases, and no signing config in Gradle at all —assembleReleaseproduced an unsigned APK, and the existing release artifact came from the Android Studio "Generate Signed Bundle/APK" wizard. Meanwhilelocal.propertiesalready carried the four signing constants, which nothing read.This wires up release signing and adds a
/releaseskill that automates the whole flow, modeled on the sibling Mandacaru project's skill and on howv0.1.0was actually released (branch → PR → tag on the merge commit).Changes
releasesigning config tocomposeApp/build.gradle.kts, readingKEYSTORE_FILE,KEYSTORE_PASSWORD,KEY_ALIASandKEY_PASSWORDfromlocal.properties. Values stay out of git; only the constant names appear in tracked files.local.propertiesviaproviders.fileContents(...)instead ofFile.inputStream(), so the configuration cache (org.gradle.configuration-cache=true) tracks it as an input and invalidates correctly.KEYSTORE_FILEbeing present, so CI — which has nolocal.properties— keeps building..claude/skills/release/SKILL.md, the repo's first skill: validates the version tag, runs detekt and the shared tests, bumps AndroidversionCode/versionNameand iOSMARKETING_VERSION/CURRENT_PROJECT_VERSIONin one commit, opens a PR (sincemainis protected), then builds and verifies the signed APK, tags the merge commit, and publishes a GitHub release.Test plan
./gradlew detektpasses../gradlew :shared:allTestspasses../gradlew :composeApp:assembleReleasesucceeds andapksigner verifyreports the APK as signed (v2 scheme, 1 signer) — confirming the constants are read correctly.local.propertiesmoved aside andANDROID_HOMEset,assembleReleasestill succeeds (unsigned). This is the CI path; the file was restored afterwards. The run logged "Configuration cache entry stored" rather than "reused", confirming the provider-based read tracks the file.TEAM_ID.Checklist
./gradlew detektpassesAndroid/iOS boxes left unchecked: this is build configuration and tooling only — no app code or UI changes, so there is no runtime behaviour to exercise on a device. The Android release build was verified by building and checking the APK signature.