From 58e642b4a25ed72994ce656804ac1766b25256e7 Mon Sep 17 00:00:00 2001 From: Timur Olzhabayev Date: Fri, 8 May 2026 14:16:08 +0200 Subject: [PATCH] fix(ci): skip goreleaser validate pipe for prefixed tags The previous attempt set `release.tag` in the goreleaser configs to map the bare-semver override back to the prefixed git tag, but `release.tag` is a GoReleaser Pro field and is rejected by the OSS schema: yaml: unmarshal errors: line 40: field tag not found in type config.Release Revert to passing the full prefixed tag through GORELEASER_CURRENT_TAG and bypassing the offending pipe with `--skip=validate`. Mirrors the working pattern already used in the MCP workflow. --- .github/workflows/release-mcp.yml | 11 ++++++----- .github/workflows/release.yml | 11 ++++++----- .goreleaser.mcp.yaml | 1 - .goreleaser.yaml | 1 - 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release-mcp.yml b/.github/workflows/release-mcp.yml index fbb4cec1..a35e8c87 100644 --- a/.github/workflows/release-mcp.yml +++ b/.github/workflows/release-mcp.yml @@ -45,13 +45,14 @@ jobs: with: distribution: goreleaser version: latest - args: release --clean --config .goreleaser.mcp.yaml + # release-please tags look like `mcp/v0.1.2`, which GoReleaser's + # validate pipe can't parse as semver. Skip it; the archive name + # template uses `MCP_VERSION` directly and `release.mode: + # keep-existing` preserves release-please's notes. + args: release --clean --config .goreleaser.mcp.yaml --skip=validate env: GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} - # Override the parsed tag with the bare semver so GoReleaser's - # validation passes; the actual GitHub release tag is set via - # `release.tag` in .goreleaser.mcp.yaml. - GORELEASER_CURRENT_TAG: v${{ env.MCP_VERSION }} + GORELEASER_CURRENT_TAG: ${{ github.ref_name }} MCP_VERSION: ${{ env.MCP_VERSION }} release-mcp-to-npm: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 85baaa0f..da575463 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,14 +46,15 @@ jobs: with: distribution: goreleaser version: latest - args: release --clean + # release-please tags look like `plugin-validator/v0.42.0`, which + # GoReleaser's validate pipe can't parse as semver. Skip it; the + # archive name template uses `RELEASE_VERSION` directly and + # `release.mode: keep-existing` preserves release-please's notes. + args: release --clean --skip=validate env: GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} RELEASE_VERSION: ${{ env.RELEASE_VERSION }} - # Override the parsed tag with the bare semver so GoReleaser's - # validation passes; the actual GitHub release tag is set via - # `release.tag` in .goreleaser.yaml. - GORELEASER_CURRENT_TAG: v${{ env.RELEASE_VERSION }} + GORELEASER_CURRENT_TAG: ${{ github.ref_name }} release-to-npm: runs-on: ubuntu-latest diff --git a/.goreleaser.mcp.yaml b/.goreleaser.mcp.yaml index cdcd0c6a..0957ea70 100644 --- a/.goreleaser.mcp.yaml +++ b/.goreleaser.mcp.yaml @@ -38,4 +38,3 @@ changelog: release: mode: keep-existing - tag: "mcp/v{{ .Version }}" diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 3c439a32..d18b93f9 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -37,7 +37,6 @@ changelog: - "^test:" release: mode: keep-existing - tag: "plugin-validator/v{{ .Version }}" # The lines beneath this are called `modelines`. See `:help modeline` # Feel free to remove those if you don't want/use them. # yaml-language-server: $schema=https://goreleaser.com/static/schema.json