Skip to content

ci(release): sign with the keystore secret, and fail without it - #5

Merged
JuggyBob merged 1 commit into
mainfrom
fix/release-workflow-signing
Oct 20, 2026
Merged

JuggyBob merged 1 commit into
mainfrom
fix/release-workflow-signing

Conversation

@JuggyBob

Copy link
Copy Markdown
Owner

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).

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).
@JuggyBob
JuggyBob merged commit 7a244a4 into main Oct 20, 2026
3 checks passed
@JuggyBob
JuggyBob deleted the fix/release-workflow-signing branch October 20, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant