Skip to content

fix: remove unsupported after hooks from GoReleaser v2 config#18

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/fix-release-errors
Closed

fix: remove unsupported after hooks from GoReleaser v2 config#18
Copilot wants to merge 2 commits intomainfrom
copilot/fix-release-errors

Conversation

Copy link
Contributor

Copilot AI commented Mar 12, 2026

GoReleaser v2 dropped the global after hooks field, causing the release job to fail immediately with a YAML unmarshal error.

Changes

  • .goreleaser.yml: Remove the after hooks section and the cp plugin.json plugin.json.orig backup step — the after block was solely restoring plugin.json post-build, which is unnecessary in a CI environment where the working directory is discarded after the job.
# Before
before:
  hooks:
    - "cp plugin.json plugin.json.orig"
    - "sed -i.bak 's/\"version\": \".*\"/\"version\": \"{{ .Version }}\"/' plugin.json && rm -f plugin.json.bak"
after:
  hooks:
    - "mv plugin.json.orig plugin.json"

# After
before:
  hooks:
    - "sed -i.bak 's/\"version\": \".*\"/\"version\": \"{{ .Version }}\"/' plugin.json && rm -f plugin.json.bak"

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix release errors in workflow plugin fix: remove unsupported after hooks from GoReleaser v2 config Mar 12, 2026
Copilot AI requested a review from intel352 March 12, 2026 22:27
@intel352 intel352 marked this pull request as ready for review March 13, 2026 08:02
Copilot AI review requested due to automatic review settings March 13, 2026 08:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the repository’s GoReleaser v2 configuration to remove an unsupported global after hooks block that causes the release workflow to fail during YAML unmarshalling.

Changes:

  • Removed the global after.hooks section from .goreleaser.yml (unsupported in GoReleaser v2).
  • Removed the now-unneeded cp plugin.json plugin.json.orig backup/restore flow, leaving only the before.hooks version substitution.

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

@intel352 intel352 closed this Mar 13, 2026
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