From af2ff836787d3daa3fc63a326ed3864cf88e641f Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 3 Aug 2026 12:08:27 -0700 Subject: [PATCH] fix(ci): resolve the default branch before the ancestry check The release job checks out the tag, so no remote-tracking ref for the default branch exists, and the guard fetched it with --depth=1 into FETCH_HEAD only. git merge-base --is-ancestor then failed on a commit that is plainly on main, blocking v0.13.0 publication after the native gate had already passed. Fetch the branch into refs/remotes/origin/ with full history, which is what the ancestry question actually needs. Co-Authored-By: Claude Fable 5 --- .github/workflows/release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 88552dc3..d01c5431 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -106,7 +106,11 @@ jobs: RELEASE_TAG: ${{ steps.release.outputs.tag }} run: | set -euo pipefail - git fetch --no-tags origin "$DEFAULT_BRANCH" --depth=1 + # Fetch the default branch into its remote-tracking ref with full history: + # this job checks out the tag, so origin/ does not otherwise exist, + # and --depth=1 cannot answer the ancestry question below. + git fetch --no-tags origin \ + "+refs/heads/$DEFAULT_BRANCH:refs/remotes/origin/$DEFAULT_BRANCH" release_sha="$(git rev-parse "$RELEASE_TAG^{commit}")" package_version="$(node -p "require('./package.json').version")" expected_tag="v$package_version"