From d1a570967dee95fd368e563cebfb859694f15b4b Mon Sep 17 00:00:00 2001 From: Timur Olzhabayev Date: Fri, 8 May 2026 13:54:01 +0200 Subject: [PATCH 1/2] fix(ci): handle release-please prefixed tags in goreleaser publish 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. --- .github/workflows/release.yml | 9 ++++++++- .goreleaser.mcp.yaml | 3 +++ .goreleaser.yaml | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3e45deb3..23027b29 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,14 +42,21 @@ jobs: - name: Extract release version run: echo "RELEASE_VERSION=${GITHUB_REF_NAME#plugin-validator/v}" >> "$GITHUB_ENV" + - name: Find previous tag + run: | + PREV=$(git tag --sort=-version:refname | grep '^plugin-validator/v' | grep -v "^${GITHUB_REF_NAME}$" | head -1) + echo "PREVIOUS_TAG=${PREV}" >> "$GITHUB_ENV" + - uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0 with: distribution: goreleaser version: latest - args: release --clean + args: release --clean --skip=validate env: GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} RELEASE_VERSION: ${{ env.RELEASE_VERSION }} + GORELEASER_CURRENT_TAG: ${{ github.ref_name }} + GORELEASER_PREVIOUS_TAG: ${{ env.PREVIOUS_TAG }} release-to-npm: runs-on: ubuntu-latest diff --git a/.goreleaser.mcp.yaml b/.goreleaser.mcp.yaml index 4f9ba6a6..0957ea70 100644 --- a/.goreleaser.mcp.yaml +++ b/.goreleaser.mcp.yaml @@ -35,3 +35,6 @@ checksum: changelog: disable: true + +release: + mode: keep-existing diff --git a/.goreleaser.yaml b/.goreleaser.yaml index fc3182dd..d18b93f9 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -35,6 +35,8 @@ changelog: exclude: - "^docs:" - "^test:" +release: + mode: keep-existing # 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 From 9e014c6ecdc3718a20b2f540a8ee078f6c2c6d6a Mon Sep 17 00:00:00 2001 From: Timur Olzhabayev Date: Fri, 8 May 2026 14:02:10 +0200 Subject: [PATCH 2/2] fix(ci): use release.tag override instead of --skip=validate 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. --- .github/workflows/release-mcp.yml | 13 +++++-------- .github/workflows/release.yml | 13 +++++-------- .goreleaser.mcp.yaml | 1 + .goreleaser.yaml | 1 + 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release-mcp.yml b/.github/workflows/release-mcp.yml index ee67b402..fbb4cec1 100644 --- a/.github/workflows/release-mcp.yml +++ b/.github/workflows/release-mcp.yml @@ -41,20 +41,17 @@ jobs: - name: Extract MCP version run: echo "MCP_VERSION=${GITHUB_REF_NAME#mcp/v}" >> $GITHUB_ENV - - name: Find previous MCP tag - run: | - PREV=$(git tag --sort=-version:refname | grep '^mcp/v' | grep -v "^${GITHUB_REF_NAME}$" | head -1) - echo "MCP_PREVIOUS_TAG=${PREV}" >> $GITHUB_ENV - - uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0 with: distribution: goreleaser version: latest - args: release --clean --config .goreleaser.mcp.yaml --skip=validate + args: release --clean --config .goreleaser.mcp.yaml env: GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} - GORELEASER_CURRENT_TAG: ${{ github.ref_name }} - GORELEASER_PREVIOUS_TAG: ${{ env.MCP_PREVIOUS_TAG }} + # 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 }} MCP_VERSION: ${{ env.MCP_VERSION }} release-mcp-to-npm: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 23027b29..85baaa0f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,21 +42,18 @@ jobs: - name: Extract release version run: echo "RELEASE_VERSION=${GITHUB_REF_NAME#plugin-validator/v}" >> "$GITHUB_ENV" - - name: Find previous tag - run: | - PREV=$(git tag --sort=-version:refname | grep '^plugin-validator/v' | grep -v "^${GITHUB_REF_NAME}$" | head -1) - echo "PREVIOUS_TAG=${PREV}" >> "$GITHUB_ENV" - - uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0 with: distribution: goreleaser version: latest - args: release --clean --skip=validate + args: release --clean env: GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} RELEASE_VERSION: ${{ env.RELEASE_VERSION }} - GORELEASER_CURRENT_TAG: ${{ github.ref_name }} - GORELEASER_PREVIOUS_TAG: ${{ env.PREVIOUS_TAG }} + # 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 }} release-to-npm: runs-on: ubuntu-latest diff --git a/.goreleaser.mcp.yaml b/.goreleaser.mcp.yaml index 0957ea70..cdcd0c6a 100644 --- a/.goreleaser.mcp.yaml +++ b/.goreleaser.mcp.yaml @@ -38,3 +38,4 @@ changelog: release: mode: keep-existing + tag: "mcp/v{{ .Version }}" diff --git a/.goreleaser.yaml b/.goreleaser.yaml index d18b93f9..3c439a32 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -37,6 +37,7 @@ 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