From 42a5d590be35c9a79430f8088d79392c1a7d27cd Mon Sep 17 00:00:00 2001 From: Eddie A Tejeda <669988+eddietejeda@users.noreply.github.com> Date: Thu, 15 Oct 2026 12:38:10 -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() resolves to an empty string in CI, as the first sdk-python Cut Release run showed. --- .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 e3eceec..cb0b086 100644 --- a/.github/workflows/cut-release.yml +++ b/.github/workflows/cut-release.yml @@ -74,6 +74,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 }} @@ -127,6 +133,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 }}