Skip to content

Commit fbb1086

Browse files
committed
Update release.yml
1 parent 8995f07 commit fbb1086

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,9 @@ jobs:
2323
echo "Error: Version tag '${{ github.event.inputs.version }}' is not in the correct format (e.g., v1.2.3 or v1.2.3-beta.1)"
2424
exit 1
2525
fi
26-
- uses: actions/checkout@v4
27-
with:
28-
fetch-tags: true
29-
30-
- name: Verify tag does not already exist
26+
- name: Verify tag does not already exist by using ls-remote
3127
run: |
32-
if git rev-parse "${{ github.event.inputs.version }}" >/dev/null 2>&1; then
28+
if git ls-remote --tags ${{ github.server_url }}/${{ github.repository_owner }}/${{github.repository}} | grep -q "${{ github.event.inputs.version }}"; then
3329
echo "Error: Tag '${{ github.event.inputs.version }}' already exists."
3430
exit 1
3531
fi

0 commit comments

Comments
 (0)