From 2f0cd5d9f1793f8366de77008ab665760fdd327f Mon Sep 17 00:00:00 2001 From: Brendan Smith Date: Fri, 1 May 2026 16:33:10 -0400 Subject: [PATCH] ci: delete local nightly tag before goreleaser snapshot GoReleaser auto-detects the nearest reachable tag from HEAD and parses it as semver, even in --snapshot mode. After the first nightly run, the non-semver `nightly` tag becomes an ancestor of HEAD on subsequent runs and breaks the workflow with: error=failed to parse tag 'nightly' as semver: Invalid Semantic Version Delete the local `nightly` tag before GoReleaser runs so it falls back to the previous semver tag (e.g. v4.6.7). The tag is force-pushed back to the new HEAD later in the workflow, so this is local-only. --- .github/workflows/nightly.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index df4dfd6..3ce86a9 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -34,6 +34,13 @@ jobs: with: go-version: "1.25" + - name: Remove local nightly tag + if: steps.check.outputs.skip != 'true' + # GoReleaser auto-detects the nearest reachable tag and tries to parse + # it as semver. The `nightly` tag from the previous run is non-semver, + # so delete it locally before GoReleaser runs (it gets re-pushed below). + run: git tag -d nightly || true + - name: Run GoReleaser (snapshot) if: steps.check.outputs.skip != 'true' uses: goreleaser/goreleaser-action@v5