Skip to content

fix(ci): handle release-please prefixed tags in goreleaser publish#575

Merged
tolzhabayev merged 2 commits intomainfrom
fix/release-please-goreleaser-tag
May 8, 2026
Merged

fix(ci): handle release-please prefixed tags in goreleaser publish#575
tolzhabayev merged 2 commits intomainfrom
fix/release-please-goreleaser-tag

Conversation

@tolzhabayev
Copy link
Copy Markdown
Contributor

@tolzhabayev tolzhabayev commented May 8, 2026

Summary

  • Pass the bare semver (e.g. v0.42.0) via GORELEASER_CURRENT_TAG so GoReleaser's semver parser succeeds.
  • Set release.tag in both goreleaser configs (plugin-validator/v{{ .Version }} and mcp/v{{ .Version }}) so the GitHub release is still associated with the full prefixed tag created by release-please.
  • Set release.mode: keep-existing so GoReleaser appends archives + checksums to the release-please-created GitHub release without overwriting its notes.
  • Apply the same pattern to release-mcp.yml / .goreleaser.mcp.yaml so the first MCP release-please release won't hit the same trap.

Why

The first release after the release-please migration (plugin-validator/v0.42.0) shipped with zero assets. The publish workflow run 25553633790 failed at the GoReleaser step:

release failed after 0s
error=failed to parse tag 'plugin-validator/v0.42.0' as semver: invalid semantic version

release-please uses tag-separator: "/" (monorepo mode for plugin-validator + mcp-package), so tags now look like plugin-validator/v0.42.0. GoReleaser inspects the git tag and fails its semver check before producing any artifacts.

Why not --skip=validate?

A first pass on this used --skip=validate. That works but disables the entire validate pipe (git-state checks, template validation, file-collision checks, etc.), not just the semver parse. Decoupling the parsed version from the release tag via release.tag keeps validation on while still solving the actual problem.

The GoReleaser-Pro monorepo block would be the most idiomatic fix but requires a Pro license.

Test plan

  • After merge, force-update plugin-validator/v0.42.0 to the merge commit and re-push to retrigger the publish workflow
  • Confirm the publish workflow succeeds and uploads 8 archives + checksums.txt to the v0.42.0 release
  • Verify release-please's release notes on v0.42.0 are unchanged
  • Verify Docker Hub push and npm publish complete (downstream of release-to-github)

GoReleaser fails to parse the release-please monorepo tag format
`plugin-validator/v0.42.0` as semver, so v0.42.0 was published without
any binary assets. Pass the prefixed tag through `GORELEASER_CURRENT_TAG`
with `--skip=validate`, and add `release.mode: keep-existing` so
GoReleaser appends artifacts to the release-please-created GitHub
release without overwriting its notes.
academo
academo previously approved these changes May 8, 2026
@github-project-automation github-project-automation Bot moved this from 📬 Triage to 🔬 In review in Grafana Catalog Team May 8, 2026
Switch from skipping the entire validate pipe to a more surgical fix:
pass the bare semver via GORELEASER_CURRENT_TAG so semver parsing
succeeds, and set `release.tag` in the goreleaser configs to put the
GitHub release at the prefixed tag (`plugin-validator/v{{ .Version }}`,
`mcp/v{{ .Version }}`). Keeps git-state and template validation on.
@tolzhabayev tolzhabayev merged commit e33c65a into main May 8, 2026
10 checks passed
@tolzhabayev tolzhabayev deleted the fix/release-please-goreleaser-tag branch May 8, 2026 12:12
@github-project-automation github-project-automation Bot moved this from 🔬 In review to 🚀 Shipped in Grafana Catalog Team May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🚀 Shipped

Development

Successfully merging this pull request may close these issues.

2 participants