Ignore snapshot-* tags in GoReleaser git state - #26
Merged
Conversation
The Snapshot workflow publishes releases tagged snapshot-<version>, creating a real git tag. That tag isn't valid semver, so on the next run GoReleaser picks it up as the current tag, fails to parse it, and incpatch in the snapshot version_template blows up. The first ever snapshot run worked (no tags existed yet) but poisoned every run since.
rethab
added a commit
that referenced
this pull request
Aug 5, 2026
The Snapshot workflow publishes a GitHub release tagged `snapshot-<version>` on every push to main, which creates a real git tag. That tag isn't valid semver, so on the next run GoReleaser picks it up as the current tag via `git describe`, fails to parse it, and `incpatch` in the snapshot `version_template` blows up with `invalid semantic version`. The very first snapshot run worked fine (no tags existed yet, so GoReleaser defaulted to `0.0.0`), but it permanently poisoned every run after it — every Snapshot workflow run since has failed, while the regular Build/CI workflow is unaffected. Fix: add `git.ignore_tags: ["snapshot-*"]` to `.goreleaser.yml` so GoReleaser never considers its own snapshot release tags when computing the current/previous version. Verified locally with `goreleaser release --snapshot --clean` (v2.17.0, matching the pinned CI version) — it now correctly falls back to `v0.0.0` and builds successfully.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Snapshot workflow publishes a GitHub release tagged
snapshot-<version>on every push to main, which creates a real git tag. That tag isn't valid semver, so on the next run GoReleaser picks it up as the current tag viagit describe, fails to parse it, andincpatchin the snapshotversion_templateblows up withinvalid semantic version.The very first snapshot run worked fine (no tags existed yet, so GoReleaser defaulted to
0.0.0), but it permanently poisoned every run after it — every Snapshot workflow run since has failed, while the regular Build/CI workflow is unaffected.Fix: add
git.ignore_tags: ["snapshot-*"]to.goreleaser.ymlso GoReleaser never considers its own snapshot release tags when computing the current/previous version. Verified locally withgoreleaser release --snapshot --clean(v2.17.0, matching the pinned CI version) — it now correctly falls back tov0.0.0and builds successfully.