Repository navigation
ci(mobile): sign Android packages when keystore secrets exist - #155
Merged
Merged
Conversation
The package workflow now decodes a base64 keystore from repository secrets, installs a Gradle init script that configures the release signing config, builds as before, and verifies the APK with apksigner when signing is on. Without the keystore secret nothing changes: the job still produces unsigned artifacts. Signing itself is unverified until a real keystore is configured.
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
Android Packageworkflow.ANDROID_KEYSTORE_BASE64(plus password/alias/key-password secrets) exists, the job decodes the keystore, installsscripts/android-signing.init.gradleas a Gradle init script, builds, then runsapksigner verify --print-certsand fails if the APK is not signed.taleno-android-unsigned.Why an init script
tauri android initregeneratessrc-tauri/gen/androidon every run, so patching the generatedbuild.gradle.ktswould not survive CI. Gradle loads every~/.gradle/init.d/*.gradleautomatically; the workflow copies the script there only when signing is configured, and the script no-ops withoutANDROID_KEYSTORE_PATH.Required secrets (documented in
docs/MOBILE_DEVELOPMENT.md)ANDROID_KEYSTORE_BASE64,ANDROID_KEYSTORE_PASSWORD,ANDROID_KEY_ALIAS,ANDROID_KEY_PASSWORD.Verification status
apksigner verifygate is there so the first signed run fails loudly if the init script does not take effect, instead of silently uploading an unsigned APK.