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 3e45deb3..85baaa0f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,6 +50,10 @@ jobs: 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 }} release-to-npm: runs-on: ubuntu-latest diff --git a/.goreleaser.mcp.yaml b/.goreleaser.mcp.yaml index 4f9ba6a6..cdcd0c6a 100644 --- a/.goreleaser.mcp.yaml +++ b/.goreleaser.mcp.yaml @@ -35,3 +35,7 @@ checksum: changelog: disable: true + +release: + mode: keep-existing + tag: "mcp/v{{ .Version }}" diff --git a/.goreleaser.yaml b/.goreleaser.yaml index fc3182dd..3c439a32 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -35,6 +35,9 @@ changelog: exclude: - "^docs:" - "^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