Skip to content

Merge the release job into the build workflow and sign the build artifact - #124

Closed
in-jun wants to merge 1 commit into
mainfrom
fix/single-ci-workflow
Closed

Merge the release job into the build workflow and sign the build artifact#124
in-jun wants to merge 1 commit into
mainfrom
fix/single-ci-workflow

Conversation

@in-jun

@in-jun in-jun commented Sep 8, 2026

Copy link
Copy Markdown
Owner

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.

  • build runs for pushes, pull requests and vX.Y.Z tags exactly as before: unit tests, lint, assembleRelease, artifact upload. On a tag it passes -PreleaseVersion so versionName/versionCode come from the tag.
  • release runs only on a tag, after build. It downloads the APK artifact build just uploaded, signs it with the SDK's apksigner (--ks-pass env: / --key-pass env:, so no password reaches the command line), verifies the signature, and publishes it with gh release create. The keystore is decoded only in this job and removed in an always() step.
  • The Gradle signingConfig stays for local signed builds via ~/.android/release/; CI never gives Gradle a keystore, so the artifact build uploads is unsigned and release is the only place a signature is added.
  • concurrency.cancel-in-progress is disabled for tag runs so a release is never cancelled by a later push.

…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.
@in-jun

in-jun commented Sep 8, 2026

Copy link
Copy Markdown
Owner Author

Superseded: keeping build.yml and release.yml as separate workflows, with release.yml reusing build.yml via workflow_call.

@in-jun in-jun closed this Sep 8, 2026
@in-jun
in-jun deleted the fix/single-ci-workflow branch September 8, 2026 05:48
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