Merge the release job into the build workflow and sign the build artifact - #124
Closed
in-jun wants to merge 1 commit into
Closed
Merge the release job into the build workflow and sign the build artifact#124in-jun wants to merge 1 commit into
in-jun wants to merge 1 commit into
Conversation
…fact One workflow for every event: the build job produces the unsigned release APK for pushes, pull requests and version tags, and on a tag the release job downloads that exact artifact, signs it with apksigner using the keystore from secrets, and attaches it to a GitHub Release. No second build, and the key is only decoded inside the release job.
Owner
Author
|
Superseded: keeping build.yml and release.yml as separate workflows, with release.yml reusing build.yml via workflow_call. |
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.
Two workflows were running for the same commit (Build on the main push, Release on the tag), and Release rebuilt the app from scratch instead of shipping what Build had tested. This folds them into one.
buildruns for pushes, pull requests andvX.Y.Ztags exactly as before: unit tests, lint,assembleRelease, artifact upload. On a tag it passes-PreleaseVersionso versionName/versionCode come from the tag.releaseruns only on a tag, afterbuild. It downloads the APK artifactbuildjust uploaded, signs it with the SDK'sapksigner(--ks-pass env:/--key-pass env:, so no password reaches the command line), verifies the signature, and publishes it withgh release create. The keystore is decoded only in this job and removed in analways()step.signingConfigstays for local signed builds via~/.android/release/; CI never gives Gradle a keystore, so the artifactbuilduploads is unsigned andreleaseis the only place a signature is added.concurrency.cancel-in-progressis disabled for tag runs so a release is never cancelled by a later push.