From 254bd4fbc326531ee16957d5e1ab7e08196062e4 Mon Sep 17 00:00:00 2001 From: "gandalf-the-greybeard[bot]" Date: Mon, 9 Mar 2026 06:20:52 +0000 Subject: [PATCH] fix: add tag-exists guard to release workflow Fail fast when a release tag already exists instead of running the full build+package cycle only to fail at git push. Saves CI time on duplicate workflow_dispatch triggers. --- .github/workflows/plugin-release.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/plugin-release.yaml b/.github/workflows/plugin-release.yaml index 89c8fd8..67dd650 100644 --- a/.github/workflows/plugin-release.yaml +++ b/.github/workflows/plugin-release.yaml @@ -46,6 +46,15 @@ jobs: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Check tag does not already exist + run: | + if git tag -l "v${{ inputs.version }}" | grep -q "v${{ inputs.version }}"; then + echo "::error::Tag v${{ inputs.version }} already exists. Skipping duplicate release." + exit 1 + fi - name: Setup Node.js uses: actions/setup-node@v4