Fail release build when signing secrets are missing - #82
Merged
Merged
Conversation
Confirmed via CI logs (release.yml run for v1.0.0.41) that KEYSTORE_FILE/KEYSTORE_PASSWORD/KEY_ALIAS/KEY_PASSWORD are all empty in this repo, so app/build.gradle's release build falls back to debug signing. Each GitHub Actions job runs on a fresh, ephemeral VM with no persisted ~/.android/debug.keystore, so that fallback generates a new, different debug keystore on every run - meaning every published GitHub Release APK is signed with a different certificate than the previous one. Android refuses to install an update whose signing certificate doesn't match the currently-installed app's, so the in-app "Update to latest" flow always downloads the new APK successfully and then always fails at install time, regardless of network conditions or device. Add a guard step that fails the workflow with a clear error instead of silently publishing another release nobody can update to, until the real signing secrets are configured in the repo. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01147MnP2Vf5sDY2BT7UhBbn
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
v1.0.0.41release build showKEYSTORE_FILE/KEYSTORE_PASSWORD/KEY_ALIAS/KEY_PASSWORDare all empty, soapp/build.gradle's release build silently falls back tosigningConfigs.debug.~/.android/debug.keystore, so that fallback mints a brand-new debug keystore on every workflow run. Each published GitHub Release APK therefore ends up signed with a different certificate than the previous release.AppUpdateInstaller.installPackagealways downloads the new APK successfully and then the system Package Installer always rejects the install - the "app update failed" the user sees..github/workflows/release.ymlthat fails the workflow with a clear::error::message when the signing secrets aren't configured, instead of silently publishing another release nobody can update to.Note for the repo owner
This makes the underlying misconfiguration loud instead of silent, but the actual fix is to add real
KEYSTORE_FILE(base64-encoded.keystore/.jks),KEYSTORE_PASSWORD,KEY_ALIAS, andKEY_PASSWORDsecrets under Settings > Secrets and variables > Actions so every release is signed with the same, stable certificate. Until then,release.ymlwill fail on push tomainrather than publish another broken update.Test plan
release.ymlparses as valid YAML.Build and Releaserun succeeds and a device with an older release can install the new one via Settings > Update to latest.🤖 Generated with Claude Code
https://claude.ai/code/session_01147MnP2Vf5sDY2BT7UhBbn
Generated by Claude Code