From d120e69ac511a2578bec0f4eb72ba740fc2d3d57 Mon Sep 17 00:00:00 2001 From: void <1711810+taraxvoid@users.noreply.github.com> Date: Sun, 11 Oct 2026 21:50:26 -0700 Subject: [PATCH] fix(release): check the tag against the branch tip, not the run's checkout release-please tags the branch as it is when it runs. When the 0.12.2 release PR merged while #130's run was in flight, that run created v0.12.2 on the release commit, but the publish job compared it to HEAD (#130's own commit), so it refused to publish. The release PR's own run then found the release already created and skipped publishing, so 0.12.2 never reached npm. Check ancestry against origin/ instead. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release-please.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 497697c..2579f44 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -141,7 +141,12 @@ jobs: # channel: its version fits the channel (a -next tag on main, a stable # tag on next, or another line's tag on release/N.x are rejected) and # the tagged commit is on this branch (so a maintenance tag cannot be - # republished from main, or the reverse). + # republished from main, or the reverse). Compare against the branch tip + # (origin/, fetched by the checkout above), not HEAD: release-please + # tags the branch as it is when it runs, so if the release PR merges while + # an earlier push's run is in flight, that run tags a commit newer than its + # own checkout. Checking HEAD rejected it, and the release PR's own run then + # saw the release as already created and skipped publishing (v0.12.2). - name: Check tag belongs to this channel env: BRANCH: ${{ github.ref_name }} @@ -149,7 +154,7 @@ jobs: run: | set -euo pipefail bun scripts/release-channel.ts "$BRANCH" "${TAG#v}" > /dev/null - if ! git merge-base --is-ancestor "refs/tags/${TAG}^{commit}" HEAD; then + if ! git merge-base --is-ancestor "refs/tags/${TAG}^{commit}" "refs/remotes/origin/${BRANCH}"; then echo "::error::Tag ${TAG} is not on branch ${BRANCH}; run this workflow from the branch that owns the tag." >&2 exit 1 fi