From b386f44addf79601dd5f980c9779027c30edbe1b Mon Sep 17 00:00:00 2001 From: Yordis Prieto Date: Tue, 30 Sep 2025 00:46:46 -0400 Subject: [PATCH] fix: allow GoReleaser to auto-detect monorepo tags and skip semver validation GoReleaser was failing with 'git tag v0.2.0 was not made against commit...' because: - The workflow was overriding GORELEASER_CURRENT_TAG with just the version (v0.2.0) - But the actual git tag created by release-please is the full monorepo format (protoc-gen-elixir-grpc@v0.2.0) Solution: - Remove GORELEASER_CURRENT_TAG override to let GoReleaser auto-detect the full tag name - Add --skip=validate flag to bypass semver parsing (since the tag format includes component prefix) GoReleaser correctly auto-detects the full tag and proceeds with the release when validation is skipped. Signed-off-by: Yordis Prieto --- .github/workflows/cd.yml | 4 +--- go.mod | 2 -- go.sum | 6 ------ 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index c5a8b3c..ee6f2ee 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -126,7 +126,6 @@ jobs: args: release --snapshot --clean --skip=publish --config .github/goreleaser.yml env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GORELEASER_CURRENT_TAG: ${{ steps.version.outputs.version }} BUILD_COMPONENT: ${{ steps.version.outputs.component }} - name: Run GoReleaser (Release) @@ -135,10 +134,9 @@ jobs: with: distribution: goreleaser version: "~> v2" - args: release --clean --config .github/goreleaser.yml + args: release --clean --skip=validate --config .github/goreleaser.yml env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GORELEASER_CURRENT_TAG: ${{ steps.version.outputs.version }} BUILD_COMPONENT: ${{ steps.version.outputs.component }} - name: Attest Build Provenance diff --git a/go.mod b/go.mod index 2d53ef9..2c573bf 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/TrogonStack/protoc-gen go 1.24.2 require ( - connectrpc.com/connect v1.18.1 github.com/stretchr/testify v1.11.1 google.golang.org/protobuf v1.36.9 ) @@ -12,6 +11,5 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/net v0.25.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 4873c0e..2944257 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,3 @@ -connectrpc.com/connect v1.18.1 h1:PAg7CjSAGvscaf6YZKUefjoih5Z/qYkyaTrBW8xvYPw= -connectrpc.com/connect v1.18.1/go.mod h1:0292hj1rnx8oFrStN7cB4jjVBeqs+Yx5yDIC2prWDO8= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -8,10 +6,6 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw= google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=