Repository navigation
ci(release): sign with the keystore secret, and fail without it - #5
Merged
Merged
Conversation
The release workflow now restores the keystore from a repository secret, hands it to the build as environment variables, verifies the signature, and refuses to publish at all if the secret is missing. The environment variables are used rather than a `keystore.properties` file because `app/build.gradle.kts` already reads STORE_FILE, STORE_PASSWORD, KEY_ALIAS and KEY_PASSWORD from the environment as a fallback. The secret therefore never touches the filesystem, and there is only one place that knows how the release is signed. The missing-secret check lives inside the step's script rather than in an `if:` condition on `secrets`. A step conditioned on a secret made the workflow file fail to parse, and the release run died before it started - with no jobs and no message, which is the least useful way to discover that a release cannot be built. Verified locally: the same environment-variable path produces an APK signed with the release key (CN=Ivan Bizimoski, APK Signature Scheme v2).
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.
The release workflow now signs with the keystore from a repository secret, verifies the signature before publishing, and refuses to publish at all if the secret is missing.
The environment-variable route is used rather than writing a keystore.properties file, because �pp/build.gradle.kts already reads \STORE_FILE, \STORE_PASSWORD, \KEY_ALIAS\ and \KEY_PASSWORD\ from the environment as a fallback — so the secret never touches the filesystem and there is only one place that knows how the release is signed.
The missing-secret check lives inside the step's script rather than in an \if:\ condition on \secrets. A step conditioned on a secret made the workflow file fail to parse, and the release run died before it started, with no jobs and no message — the least useful way to discover that a release cannot be built.
Verified locally: the same environment-variable path produces an APK signed with the release key (CN=Ivan Bizimoski, APK Signature Scheme v2).