Skip to content

Fix GoReleaser v2 release workflow - #131

Merged
okkez merged 3 commits into
masterfrom
copilot/fix-goreleaser-failure
Nov 27, 2026
Merged

okkez merged 3 commits into
masterfrom
copilot/fix-goreleaser-failure

Conversation

@itkrt2y

@itkrt2y itkrt2y commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

The release job fails because GoReleaser v2 rejects --rm-dist. The existing configuration also uses a legacy schema that v2 no longer supports.

  • Workflow: Pin GoReleaser, use release --clean, and grant release-writing permission.
  • Configuration: Migrate to the v2 schema while preserving archive names and snapshot versioning.
  • Local releases: Align the Makefile’s GoReleaser version and command with the workflow.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@itkrt2y itkrt2y changed the title [WIP] Fix failing GitHub Actions job 'goreleaser' Fix GoReleaser v2 release workflow Nov 26, 2026
@itkrt2y
itkrt2y requested a review from okkez November 26, 2026 07:27
@itkrt2y
itkrt2y marked this pull request as ready for review November 26, 2026 07:27
@itkrt2y itkrt2y removed their assignment Nov 26, 2026
@okkez

okkez commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

1. The set of release artifacts changes (.goreleaser.yml)

builds does not set goos/goarch, so GoReleaser v2.20.3 uses its defaults (goos: [linux, darwin, windows], goarch: [amd64, arm64, 386], see internal/builders/golang/build.go). After excluding darwin/386, the next release will publish 8 archives instead of the 4 in v0.1.1:

  • v0.1.1: Darwin_x86_64, Linux_arm64, Linux_i386, Linux_x86_64
  • Added: Darwin_arm64, Windows_i386, Windows_x86_64, Windows_arm64

The Windows archives will also be .tar.gz, because archives has no format_overrides.

The archive names are kept as the PR description says, but the set of artifacts is not. Is shipping Windows binaries intended?

  • To keep the previous set: add goos: [linux, darwin] to builds (and ignore darwin/arm64 if needed).
  • To ship Windows: add format_overrides with goos: windows and formats: [zip] to archives.

2. make init needs a much newer Go (Makefile)

The go.mod of github.com/goreleaser/goreleaser/v2@v2.20.3 declares go 1.27.4. This repository (go.mod and CI) uses Go 1.19, so go install in make init fails unless the newer toolchain can be downloaded automatically (for example, it fails with GOTOOLCHAIN=local). v0.183.0 did not have this requirement.

Consider documenting the required Go version, or installing the prebuilt GoReleaser binary instead of using go install.

- GoReleaser v2 defaults to linux/darwin/windows x amd64/arm64/386,
  which would add Windows archives that were never distributed before
- Drop 386 since 32-bit Linux builds are no longer needed
- Release archives: Linux_x86_64, Linux_arm64, Darwin_x86_64, Darwin_arm64
@codecov

codecov Bot commented Nov 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.24%. Comparing base (83eda54) to head (c19e331).
⚠️ Report is 16 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #131      +/-   ##
==========================================
- Coverage   81.23%   80.24%   -1.00%     
==========================================
  Files          15       16       +1     
  Lines         453      572     +119     
==========================================
+ Hits          368      459      +91     
- Misses         63       91      +28     
  Partials       22       22              
Flag Coverage Δ
unittests 80.24% <ø> (-1.00%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@okkez
okkez merged commit 627d5c9 into master Nov 27, 2026
2 of 3 checks passed
@okkez
okkez deleted the copilot/fix-goreleaser-failure branch November 27, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants