Skip to content

Fix GoReleaser workflow for pull requests - #7

Merged
ttys3 merged 1 commit into
mainfrom
ci/fix-goreleaser-workflow
Sep 4, 2026
Merged

Fix GoReleaser workflow for pull requests#7
ttys3 merged 1 commit into
mainfrom
ci/fix-goreleaser-workflow

Conversation

@ttys3

@ttys3 ttys3 commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • run a GoReleaser snapshot for pull requests and reserve formal releases for tag pushes
  • use read-only repository permissions by default and grant write access only to the release job
  • upgrade GoReleaser Action to v7, GoReleaser CLI to v2, and CI Go to 1.27.1
  • run the race-enabled Go test suite before snapshot builds and releases

Motivation

The existing workflow runs goreleaser release --clean for pull request merge commits. Those commits are not version tags, so GoReleaser exits before building with an error such as:

git tag v1.1.2 was not made against commit ...

Snapshot mode removes the tag requirement while still building and packaging every supported target. Formal publishing remains restricted to tag pushes.

Validation

  • actionlint .github/workflows/release.yml
  • GOTOOLCHAIN=go1.27.1 go test -count=1 -race ./...
  • GOTOOLCHAIN=go1.27.1 go vet ./...
  • goreleaser release --snapshot --clean with GoReleaser v2.18.0
  • successful snapshot builds for Linux, macOS, and Windows targets
  • gitleaks scan of the resulting commit (no leaks found)

Run snapshot releases with read-only permissions for pull requests and reserve write-enabled releases for tags. Upgrade CI to Go 1.27.1 and GoReleaser Action v7 with CLI v2.

Co-Authored-By: Codex (gpt-5.6-sol) <noreply@openai.com>
@ttys3
ttys3 merged commit 84569d8 into main Sep 4, 2026
2 checks passed
@ttys3
ttys3 deleted the ci/fix-goreleaser-workflow branch September 4, 2026 03:17
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.

1 participant