Skip to content

Commit cf14dae

Browse files
committed
fix: skip tagging when tag already exists
1 parent add3cbb commit cf14dae

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ jobs:
8989
else
9090
git commit -m "chore(release): v${NEW_VERSION}"
9191
fi
92-
git tag -a "v${NEW_VERSION}" -m "Release v${NEW_VERSION}"
92+
if git rev-parse "v${NEW_VERSION}" >/dev/null 2>&1; then
93+
echo "Tag v${NEW_VERSION} already exists, skipping"
94+
else
95+
git tag -a "v${NEW_VERSION}" -m "Release v${NEW_VERSION}"
96+
fi
9397
git push origin main --follow-tags
9498
9599
- name: Publish to npm

0 commit comments

Comments
 (0)