fix: Improve tag existence check in release workflow
This commit is contained in:
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@@ -28,6 +28,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Fetch tags
|
||||||
|
run: git fetch --tags origin
|
||||||
|
|
||||||
- name: Determine plugin version
|
- name: Determine plugin version
|
||||||
id: meta
|
id: meta
|
||||||
run: |
|
run: |
|
||||||
@@ -43,7 +46,7 @@ jobs:
|
|||||||
id: tagcheck
|
id: tagcheck
|
||||||
run: |
|
run: |
|
||||||
TAG="v${{ steps.meta.outputs.version }}"
|
TAG="v${{ steps.meta.outputs.version }}"
|
||||||
if git rev-parse "$TAG" >/dev/null 2>&1; then
|
if git show-ref --tags --verify --quiet "refs/tags/$TAG"; then
|
||||||
echo "exists=true" >> "$GITHUB_OUTPUT"
|
echo "exists=true" >> "$GITHUB_OUTPUT"
|
||||||
else
|
else
|
||||||
echo "exists=false" >> "$GITHUB_OUTPUT"
|
echo "exists=false" >> "$GITHUB_OUTPUT"
|
||||||
|
|||||||
Reference in New Issue
Block a user