Skip to content

Commit 6e372a2

Browse files
committed
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.
1 parent f1fd013 commit 6e372a2

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎.github/workflows/cut-release.yml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ jobs:
7272
git config user.name "$slug"
7373
git config user.email "${id}+${slug}@users.noreply.github.com"
7474
75+
# release.sh resolves the default branch from origin/HEAD, which
76+
# actions/checkout never sets; without this the script sees an empty
77+
# branch name and git aborts on an empty pathspec.
78+
- name: Point origin/HEAD at the default branch
79+
run: git remote set-head origin --auto
80+
7581
- name: Prepare release
7682
env:
7783
GH_TOKEN: ${{ steps.app-token.outputs.token }}
@@ -125,6 +131,12 @@ jobs:
125131
git config user.name "$slug"
126132
git config user.email "${id}+${slug}@users.noreply.github.com"
127133
134+
# release.sh resolves the default branch from origin/HEAD, which
135+
# actions/checkout never sets; without this the script sees an empty
136+
# branch name and git aborts on an empty pathspec.
137+
- name: Point origin/HEAD at the default branch
138+
run: git remote set-head origin --auto
139+
128140
- name: Tag and push
129141
env:
130142
GH_TOKEN: ${{ steps.app-token.outputs.token }}

0 commit comments

Comments
 (0)