Skip to content

Commit 23c821b

Browse files
authored
Merge pull request #167 from stellarwp/fix-ci
Fix release prep
2 parents fc95c31 + f9c4b7c commit 23c821b

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/release-prep.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,16 @@ jobs:
3434
run: |
3535
# Use the ref input or default to ref where the workflow file is ran from.
3636
if [ -n "${{ github.event.inputs.ref }}" ]; then
37-
echo "JOB_REF=${{ github.event.inputs.ref }}" >> $GITHUB_ENV
37+
JOB_REF="${{ github.event.inputs.ref }}"
3838
else
39-
echo "JOB_REF=${{ github.ref }}" >> $GITHUB_ENV
39+
JOB_REF="${{ github.ref }}"
4040
fi
41+
# Strip refs/heads/ so peter-evans sees the same short form it derives
42+
# from `git symbolic-ref HEAD --short`. Without this, base="refs/heads/main"
43+
# won't match working base "main" and the action enters its rebase path,
44+
# which fetches into the checked-out branch and dies under Git >= 2.45.
45+
JOB_REF="${JOB_REF#refs/heads/}"
46+
echo "JOB_REF=$JOB_REF" >> $GITHUB_ENV
4147
4248
echo "JOB_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
4349
@@ -64,7 +70,6 @@ jobs:
6470
- uses: actions/checkout@v6
6571
with:
6672
ref: ${{ needs.set_vars.outputs.ref }}
67-
fetch-depth: 0
6873

6974
- uses: oven-sh/setup-bun@v2
7075

0 commit comments

Comments
 (0)