From 6e372a2f251bda4f1b5e33c279a6d85f9d5c826d Mon Sep 17 00:00:00 2001 From: Eddie A Tejeda <669988+eddietejeda@users.noreply.github.com> Date: Thu, 15 Oct 2026 12:38:03 -0700 Subject: [PATCH] ci: set origin/HEAD before running release.sh actions/checkout does not create refs/remotes/origin/HEAD, so release.sh's default_branch() resolved to an empty string and the first Cut Release run failed on an empty pathspec. --- .github/workflows/cut-release.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/cut-release.yml b/.github/workflows/cut-release.yml index fb68c23..f5be7c6 100644 --- a/.github/workflows/cut-release.yml +++ b/.github/workflows/cut-release.yml @@ -72,6 +72,12 @@ jobs: git config user.name "$slug" git config user.email "${id}+${slug}@users.noreply.github.com" + # release.sh resolves the default branch from origin/HEAD, which + # actions/checkout never sets; without this the script sees an empty + # branch name and git aborts on an empty pathspec. + - name: Point origin/HEAD at the default branch + run: git remote set-head origin --auto + - name: Prepare release env: GH_TOKEN: ${{ steps.app-token.outputs.token }} @@ -125,6 +131,12 @@ jobs: git config user.name "$slug" git config user.email "${id}+${slug}@users.noreply.github.com" + # release.sh resolves the default branch from origin/HEAD, which + # actions/checkout never sets; without this the script sees an empty + # branch name and git aborts on an empty pathspec. + - name: Point origin/HEAD at the default branch + run: git remote set-head origin --auto + - name: Tag and push env: GH_TOKEN: ${{ steps.app-token.outputs.token }}