Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 3, 2026

GoReleaser v2.13.2+ requires explicit version: 2 in configuration files. The CI was failing with: "only version: 2 configuration files are supported, yours is version: 0".

Changes

  • Add version: 2 declaration
  • Replace deprecated archives.replacements with name_template using Go templating:
    archives:
      - name_template: >-
          {{ .ProjectName }}_
          {{- title .Os }}_
          {{- if eq .Arch "amd64" }}x86_64
          {{- else if eq .Arch "386" }}i386
          {{- else }}{{ .Arch }}{{ end }}
  • Replace snapshot.name_template with snapshot.version_template
  • Remove deprecated format and format_overrides fields (defaults to tar.gz, zip for Windows)
  • Add LICENSE and README.md to archive contents

Validated with goreleaser check.

Original prompt

This section details on the original issue you should resolve

<issue_title>Fix go releaser config</issue_title>
<issue_description>/opt/hostedtoolcache/goreleaser-action/2.13.2/x64/goreleaser release --clean
• only version: 2 configuration files are supported, yours is version: 0, please update your configuration
⨯ release failed after 0s error=only version: 2 configuration files are supported, yours is version: 0, please update your configuration
2s
Run goreleaser/goreleaser-action@v2

Downloading https://github.com/goreleaser/goreleaser/releases/download/v2.13.2/goreleaser_Linux_x86_64.tar.gz
Extracting GoReleaser
/usr/bin/tar xz --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/19736587-98f0-4d0e-9140-589bf069bb4c -f /home/runner/work/_temp/f60430e3-338f-4e38-95b6-3afe504da877
GoReleaser latest installed successfully
v1.0.1 tag found for commit 'dc68988'
/opt/hostedtoolcache/goreleaser-action/2.13.2/x64/goreleaser release --clean
• only version: 2 configuration files are supported, yours is version: 0, please update your configuration
⨯ release failed after 0s error=only version: 2 configuration files are supported, yours is version: 0, please update your configuration
Error: The process '/opt/hostedtoolcache/goreleaser-action/2.13.2/x64/goreleaser' failed with exit code 1
0s
</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: amitsaha <512598+amitsaha@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix GoReleaser configuration to version 2 Migrate .goreleaser.yml to v2 format Jan 3, 2026
Copilot AI requested a review from amitsaha January 3, 2026 05:27
@amitsaha amitsaha marked this pull request as ready for review January 3, 2026 05:39
@amitsaha amitsaha merged commit 567e441 into master Jan 3, 2026
5 checks passed
@amitsaha amitsaha deleted the copilot/fix-goreleaser-config branch January 3, 2026 05:54
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.

Fix go releaser config

2 participants