Skip to content

Commit f872b7b

Browse files
authored
fix(ci): exclude HEAD from git branch output in pypi release job
1 parent cf72234 commit f872b7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
id: get_branch_name
1717
run: |
1818
raw=$(git branch -r --contains ${{ github.ref }})
19-
branch=$(echo "$raw" | grep "origin/main" | sed "s|origin/||" | xargs)
19+
branch=$(echo "$raw" | grep "origin/main" | grep -v "HEAD" | sed "s|origin/||" | xargs)
2020
echo "name=$branch" >> "$GITHUB_OUTPUT"
2121
build:
2222
name: Build distribution

0 commit comments

Comments
 (0)