Skip to content

Commit 9c6330a

Browse files
ci(release): skip tagging if version tag already exists
* Check for existing version tag before creating a new one * Prevents duplicate tags in the release process
1 parent 568bea0 commit 9c6330a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/release.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,9 @@ jobs:
7171
if: steps.check.outputs.has_changes == 'false'
7272
run: |
7373
VERSION=$(node -p "require('./package.json').version")
74-
git tag "v$VERSION"
75-
git push --tags
74+
if git tag | grep -q "^v$VERSION$"; then
75+
echo "Tag v$VERSION already exists, skipping."
76+
else
77+
git tag "v$VERSION"
78+
git push --tags
79+
fi

0 commit comments

Comments
 (0)