Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit 512c161

Browse files
committed
Add tag existence check to release workflow
1 parent 502d0f8 commit 512c161

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,19 @@ jobs:
5050
run: |
5151
echo "version=$(grep -m1 '^version:' src/main/resources/plugin.yml | sed 's/version:[ ]*//')" >> $GITHUB_OUTPUT
5252
53+
- name: Fetch all tags
54+
run: git fetch --tags
55+
56+
- name: Check if tag exists
57+
run: |
58+
TAG=${{ steps.vars.outputs.version }}
59+
if git ls-remote --tags origin "refs/tags/$TAG" | grep -q "$TAG"; then
60+
echo "❌ Tag '$TAG' existiert bereits. Breche ab."
61+
exit 1
62+
else
63+
echo "✅ Tag '$TAG' ist neu. Fortfahren..."
64+
fi
65+
5366
- name: Find built JAR
5467
id: jar
5568
run: |

0 commit comments

Comments
 (0)