Skip to content

fix(release): let GoReleaser own the GitHub release#61

Merged
devantler merged 1 commit into
mainfrom
claude/fix-release-goreleaser-conflict
May 25, 2026
Merged

fix(release): let GoReleaser own the GitHub release#61
devantler merged 1 commit into
mainfrom
claude/fix-release-goreleaser-conflict

Conversation

@devantler

Copy link
Copy Markdown
Contributor

🤖 Generated by the Daily AI Assistant

Problem

CD - Go (GoReleaser) has failed on every tag since #59. Latest run on v1.0.0 (run):

✗ upload failed  error=POST .../releases/328564694/assets?name=go-template_1.0.0_darwin_arm64.tar.gz:
  422 Cannot upload assets to an immutable release
⨯ release failed after 20s  error=scm releases: failed to publish artifacts

Root cause

#59 added .releaserc by copying it verbatim from dotnet-template, which includes @semantic-release/github. That plugin creates a GitHub Release for each new tag, and GitHub now makes published releases immutable. The sequence is:

  1. Release (semantic-release) pushes the tag and creates the immutable GitHub Release (empty — semantic-release attaches no binaries).
  2. CD - Go fires on the tag, GoReleaser builds the binaries and tries to upload them to that release → 422, immutable.

For dotnet-template the copied config is correct (it's .NET — no GoReleaser, so semantic-release rightly owns the release). A Go repo additionally runs GoReleaser, which must own the release to publish assets atomically.

Fix

Mirror ksail's proven .releaserc (a Go CLI with the identical Release + GoReleaser CD pair, releasing green):

   "plugins": [
-    "@semantic-release/commit-analyzer",
-    "@semantic-release/release-notes-generator",
-    "@semantic-release/github"
+    "@semantic-release/commit-analyzer"
   ]

semantic-release now only computes the version and creates the tag; GoReleaser owns the GitHub Release and its assets (no conflict). The resulting file is byte-identical to ksail's .releaserc.

Validation

  • JSON validated; identical to ksail's working config.
  • End-to-end: merging this fix: PR will itself trigger commit-analyzer → a patch release (v1.0.1), which GoReleaser will publish cleanly — confirming the fix on merge.

Note for the maintainer

The pre-existing v1.0.0 GitHub Release (created empty + immutable by the old config) can't be repaired in place. It's harmless to leave; the next release (v1.0.1) will be created correctly by GoReleaser with binaries. Delete v1.0.0 if you'd prefer a clean release list.

The .releaserc added in #59 (copied verbatim from dotnet-template) included
@semantic-release/github, which creates an immutable GitHub Release for each
new tag. The CD - Go workflow's GoReleaser then fails with HTTP 422 "Cannot
upload assets to an immutable release" when attaching the built binaries.

dotnet-template is .NET (no GoReleaser), so semantic-release owning the
release is correct there. A Go repo additionally runs GoReleaser, which must
own the release to publish assets atomically. Mirror ksail's proven config:
semantic-release uses only @semantic-release/commit-analyzer to compute the
version and create the tag; GoReleaser (triggered by the tag push) creates
the GitHub Release and uploads the binaries.
Copilot AI review requested due to automatic review settings May 25, 2026 07:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts the repository’s semantic-release configuration so semantic-release only computes the next version and creates the tag, avoiding creation of an immutable GitHub Release that prevents GoReleaser from uploading assets.

Changes:

  • Removes @semantic-release/github so semantic-release no longer creates the GitHub Release (GoReleaser will create it instead).
  • Removes @semantic-release/release-notes-generator, leaving only @semantic-release/commit-analyzer in the plugin chain.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@devantler devantler marked this pull request as ready for review May 25, 2026 07:54
@devantler devantler merged commit 91aa203 into main May 25, 2026
16 checks passed
@devantler devantler deleted the claude/fix-release-goreleaser-conflict branch May 25, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants