Skip to content

Release the artifact build.yml produced instead of rebuilding - #125

Merged
in-jun merged 1 commit into
mainfrom
fix/release-from-build-artifact
Sep 8, 2026
Merged

Release the artifact build.yml produced instead of rebuilding#125
in-jun merged 1 commit into
mainfrom
fix/release-from-build-artifact

Conversation

@in-jun

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

Copy link
Copy Markdown
Owner

The first tag run failed in its verify step: "$ANDROID_HOME"/build-tools/*/apksigner expanded to several preinstalled build-tools directories on the runner, so the command never ran cleanly. It also rebuilt the app instead of releasing what Build had just tested, and left two runs on the same commit. This keeps the two workflows but makes Release reuse Build.

  • build.yml adds a workflow_call trigger with an optional tag input. When called with a tag it passes -PreleaseVersion so versionName/versionCode come from the tag; pushes and pull requests are unchanged. Concurrency moves to the job so it does not collide with the caller's group.
  • release.yml on a vX.Y.Z tag runs build.yml as its first job, downloads the APK that job uploaded, installs build-tools;36.0.0 explicitly, signs the artifact with apksigner (passwords via --ks-pass env: / --key-pass env:), verifies it, 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 from ~/.android/release/; CI never hands Gradle a keystore, so the artifact Build uploads is unsigned and Release is the only place a signature is added.

build.yml gains a workflow_call trigger so release.yml can run it as
its build job on a version tag, then sign that exact artifact with
apksigner and attach it to a GitHub Release. Fixes the first release
attempt, which globbed build-tools/*/apksigner and matched several
preinstalled versions on the runner.
@in-jun
in-jun merged commit afdaf80 into main Sep 8, 2026
1 check passed
@in-jun
in-jun deleted the fix/release-from-build-artifact branch September 8, 2026 05:52
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