Skip to content

Commit 6440d58

Browse files
committed
Fail release if tag exists
1 parent 35a939a commit 6440d58

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/release_package.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,14 @@ jobs:
122122
version: ${{ env.NEW_VERSION }}
123123
operation: release
124124

125+
- name: Ensure tag does not already exist
126+
run: |
127+
git fetch --tags origin
128+
if git rev-parse "refs/tags/${{ env.NEW_VERSION }}" >/dev/null 2>&1; then
129+
echo "Tag ${{ env.NEW_VERSION }} already exists on origin."
130+
exit 1
131+
fi
132+
125133
# Commit changes
126134
- name: Sync lockfile after version bump
127135
run: pnpm install --lockfile-only

0 commit comments

Comments
 (0)