Skip to content

ci(release): auto-trigger multi-OS build on release-please merge#69

Merged
oorabona merged 1 commit into
mainfrom
ci/chain-release-build
Jun 10, 2026
Merged

ci(release): auto-trigger multi-OS build on release-please merge#69
oorabona merged 1 commit into
mainfrom
ci/chain-release-build

Conversation

@oorabona

Copy link
Copy Markdown
Collaborator

Summary

Merging the release-please release PR now produces the FULL release (tag, multi-OS builds, assets, publication) with zero manual steps. Previously every release required gh workflow run release.yml --field tag=vX.Y.Z by hand, because the tag release-please pushes (with the default GITHUB_TOKEN) can never trigger tag-triggered workflows (GitHub anti-recursion rule).

  • release.yml gains a workflow_call trigger (tag + optional ref carrying the exact commit SHA — needed because a draft release's git tag may not exist yet); the existing tag-push and manual-dispatch triggers are kept as fallbacks. All six checkouts pin to ref || tag, and TERMORA_BUILD_HASH is now stamped from git rev-parse HEAD of the checkout instead of the event SHA, so binaries always report the commit actually built.
  • release-please.yml gains a release-build job that calls release.yml when release_created == 'true', passing tag_name + the merge SHA.
  • release-please-config.json switches to draft releases (draft: true): assets attach to the draft and the release goes public only when every build succeeded — a mid-build failure can no longer leave a public release with partial assets. force-tag-creation: true makes release-please create the git tag immediately (GitHub defers tag creation for drafts), so subsequent release-please runs compute versions/changelogs correctly even if a build fails. create-release reuses release-please's draft (preserving its curated changelog body), deletes only duplicate drafts, and retargets a stale draft's target_commitish to the built commit before it can be published.

The release flow becomes: merge the release PR → tag + draft release + 3-OS builds + assets → auto-publish. The workflow_dispatch path remains available to re-run builds for an existing tag.

Test plan

  • actionlint clean on both workflows (only pre-existing SC2129 style nit on an untouched block)
  • release-please-config.json valid; draft + force-tag-creation confirmed against the upstream config schema
  • Three trigger modes coexist (push: tags, workflow_dispatch, workflow_call); caller permissions (contents: write) cover the callee
  • End-to-end proof at the next release: merge the open release-please PR (release 0.4.0) and verify builds chain automatically, the draft fills with ~9 assets, then auto-publishes

Release-please pushes tags with GITHUB_TOKEN, which cannot trigger
tag-based workflows (anti-recursion). release.yml gains a workflow_call
trigger (tag + optional ref, since a draft release's tag does not exist
yet) and release-please.yml calls it on release_created with the tag
and merge SHA — no more manual dispatch.

All checkouts pin to ref||tag and build hashes come from `git rev-parse
HEAD` of the checkout, so binaries always stamp the commit actually
built. The create-release step reuses release-please's draft (keeping
its changelog body), deletes only duplicate drafts, retargets a stale
draft to the built commit, and creates new drafts with an explicit
--target.

release-please now creates draft releases (assets attach to the draft;
it goes public only once all builds succeed — no partial-asset public
release) with force-tag-creation so version computation stays correct
even when a build fails.
@oorabona oorabona force-pushed the ci/chain-release-build branch from be41ef5 to 2c278a1 Compare June 10, 2026 23:32
@oorabona oorabona merged commit af830c4 into main Jun 10, 2026
8 checks passed
@oorabona oorabona deleted the ci/chain-release-build branch June 10, 2026 23:36
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