Skip to content

fix: resolve goreleaser v2.6 archives.format deprecation#103

Merged
SantiagoDePolonia merged 2 commits intomainfrom
fix/goreleaser7-fix
Feb 25, 2026
Merged

fix: resolve goreleaser v2.6 archives.format deprecation#103
SantiagoDePolonia merged 2 commits intomainfrom
fix/goreleaser7-fix

Conversation

@SantiagoDePolonia
Copy link
Copy Markdown
Contributor

@SantiagoDePolonia SantiagoDePolonia commented Feb 25, 2026

Replace deprecated format with formats list, add Windows zip override, improve changelog config with GitHub attribution and expanded noise filters, and add release footer with changelog link.

Summary by CodeRabbit

  • Chores
    • Optimized release archive formats—tar.gz for most platforms and zip for Windows.
    • Enhanced release changelog with improved filtering and added direct link to full changelog history.

SantiagoDePolonia and others added 2 commits February 25, 2026 19:56
Replace deprecated `format` with `formats` list, add Windows zip
override, improve changelog config with GitHub attribution and
expanded noise filters, and add release footer with changelog link.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add doc:/Docs:/perf: prefix filters and exclude Revert/Merge commits
to reduce noise in generated changelogs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@SantiagoDePolonia SantiagoDePolonia self-assigned this Feb 25, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 25, 2026

📝 Walkthrough

Walkthrough

The pull request updates the GoReleaser configuration file to refine the release artifact archival strategy, extend changelog metadata, broaden changelog filtering criteria, and introduce a footer linking to full release notes comparing versions.

Changes

Cohort / File(s) Summary
GoReleaser Configuration
.goreleaser.yaml
Modified archives to use a formats array supporting tar.gz with Windows-specific zip override; extended changelog metadata with GitHub integration settings and enhanced filtering to exclude additional patterns (docs, test categories, refactor, ci, chore, build, style, perf); added release footer with changelog comparison link.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 With archives now flexible, Windows gets zip,
While changelogs filter with a careful grip,
The releases leap forward, cleaner and bright,
GoReleaser hops onward—everything right!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: resolving a goreleaser v2.6 archives.format deprecation, which directly corresponds to the primary modification in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/goreleaser7-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.goreleaser.yaml:
- Around line 63-65: The release.footer currently always emits a GitHub compare
URL using {{ .PreviousTag }} and {{ .Tag }}, which produces an invalid link on
the first release when {{ .PreviousTag }} is empty; update the release.footer
template to conditionally render the compare URL only if {{ .PreviousTag }} is
non-empty (guarding the template with an if/else around the current footer
content), and provide an alternate footer (e.g., a simple link or message
referencing only {{ .Tag }}) when {{ .PreviousTag }} is empty so the generated
footer is always valid.

ℹ️ Review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fcad5b3 and f38b7b2.

📒 Files selected for processing (1)
  • .goreleaser.yaml

Comment on lines +63 to +65
release:
footer: |
**Full Changelog**: https://github.com/ENTERPILOT/GOModel/compare/{{ .PreviousTag }}...{{ .Tag }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Verify whether this repo has enough tags for a compare footer to always work.
tag_count="$(git tag | wc -l | tr -d ' ')"
echo "tag_count=${tag_count}"
git tag --sort=version:refname | tail -n 5

Repository: ENTERPILOT/GOModel

Length of output: 73


🌐 Web query:

GoReleaser PreviousTag empty first release template documentation

💡 Result:

In GoReleaser templates, .PreviousTag is “the previous git tag, or empty if no previous tags”—so on your first release it will be an empty string. [1]

To handle that in a template, guard it with a conditional, e.g.:

{{- if .PreviousTag -}}
Changes since {{ .PreviousTag }}
{{- else -}}
First release
{{- end -}}

Source: GoReleaser “Templates” docs (common fields table). [1]


Handle first-release footer when PreviousTag is empty.

Line 65 builds a compare URL from {{ .PreviousTag }}; on a first release this will be empty because the repository has no tags yet. This creates an invalid GitHub compare link (...{{ .Tag }}). Guard the footer template with a conditional to handle this edge case:

💡 Proposed safe footer template
 release:
   footer: |
-    **Full Changelog**: https://github.com/ENTERPILOT/GOModel/compare/{{ .PreviousTag }}...{{ .Tag }}
+    {{- if .PreviousTag }}
+    **Full Changelog**: https://github.com/ENTERPILOT/GOModel/compare/{{ .PreviousTag }}...{{ .Tag }}
+    {{- else }}
+    **Release**: https://github.com/ENTERPILOT/GOModel/releases/tag/{{ .Tag }}
+    {{- end }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.goreleaser.yaml around lines 63 - 65, The release.footer currently always
emits a GitHub compare URL using {{ .PreviousTag }} and {{ .Tag }}, which
produces an invalid link on the first release when {{ .PreviousTag }} is empty;
update the release.footer template to conditionally render the compare URL only
if {{ .PreviousTag }} is non-empty (guarding the template with an if/else around
the current footer content), and provide an alternate footer (e.g., a simple
link or message referencing only {{ .Tag }}) when {{ .PreviousTag }} is empty so
the generated footer is always valid.

@SantiagoDePolonia SantiagoDePolonia merged commit 872e8d2 into main Feb 25, 2026
12 checks passed
@SantiagoDePolonia SantiagoDePolonia deleted the fix/goreleaser7-fix branch March 22, 2026 14:24
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