Skip to content

Commit 0bf6745

Browse files
nogoclaude
andcommitted
Fix branch verification in release workflow
Use -a flag to include remote branches (origin/main) since GitHub Actions checkout leaves repo in detached HEAD state. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 352e3fe commit 0bf6745

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
env:
2222
TAG_NAME: ${{ github.ref_name }}
2323
run: |
24-
git branch --contains "$TAG_NAME" | grep -q 'main' || {
24+
git branch -a --contains "$TAG_NAME" | grep -qE '(^|\/)main$' || {
2525
echo "Error: Tag $TAG_NAME is not on main branch"
2626
exit 1
2727
}

0 commit comments

Comments
 (0)