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 }}