Skip to content

Commit 9001cd7

Browse files
Fix tag existence check to use exact matching and prevent false positives
Co-authored-by: thomasturrell <1552612+thomasturrell@users.noreply.github.com>
1 parent 541c63c commit 9001cd7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/manual-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ jobs:
134134
exit 1
135135
fi
136136
137-
# Check if tag exists on remote
138-
if git ls-remote --tags origin "$TAG_NAME" | grep -q "$TAG_NAME"; then
137+
# Check if tag exists on remote (use exact matching to avoid false positives)
138+
if git ls-remote --tags origin "$TAG_NAME" | grep -q "refs/tags/$TAG_NAME$"; then
139139
echo "::error::Tag $TAG_NAME already exists on remote."
140140
echo "Please use a different version number or delete the existing tag first."
141141
exit 1

0 commit comments

Comments
 (0)