Skip to content

ci: declare GoReleaser config schema version 2#52

Merged
leodido merged 1 commit into
mainfrom
ci/goreleaser-version-2-header
May 4, 2026
Merged

ci: declare GoReleaser config schema version 2#52
leodido merged 1 commit into
mainfrom
ci/goreleaser-version-2-header

Conversation

@leodido
Copy link
Copy Markdown
Owner

@leodido leodido commented May 4, 2026

Why

goreleaser check on v2.x emits this deprecation warning when the config lacks a top-level version field:

only version: 2 configuration files are supported, yours is version: 0, please update your configuration

The release pipeline still works today because .github/workflows/release.yaml pins goreleaser-action to v2.14.0 via with: { version: v2.14.0 }, and v2.14.0 still accepts v0 (legacy) configs with a warning. But:

  • The warning is noise on every CI release run.
  • A future major bump (v3.x) may turn the warning into a hard error.
  • goreleaser init on v2.x produces this header by default — our config is just missing what new configs ship with.

This is the followup mentioned as out-of-scope in #51.

What

One-line addition: version: 2 at the top of .goreleaser.yaml, with a brief comment explaining what it is.

Verification

Check Before After
goreleaser check warning emitted silent ✅
goreleaser release --snapshot --skip=publish,sign --clean builds both tarballs + checksums unchanged ✅

No functional change to the release pipeline or the artifacts produced.

Without this top-level 'version: 2' header, 'goreleaser check' on
v2.x emits the deprecation warning:

  only version: 2 configuration files are supported, yours is
  version: 0, please update your configuration

The release pipeline still works (release.yaml pins goreleaser-action
to v2.14.0 via 'with: version: v2.14.0'), but the warning is noise
and a future major bump may turn it into a hard error. 'goreleaser
init' on v2.x produces this header by default.

Verified locally:
  - 'goreleaser check' now passes silently (warning gone)
  - 'goreleaser release --snapshot --skip=publish,sign --clean'
    still builds both linux_amd64 and linux_arm64 tarballs and
    the checksums file with no behavior change

Co-authored-by: Ona <no-reply@ona.com>
@github-actions github-actions Bot added the chore label May 4, 2026
@leodido leodido self-assigned this May 4, 2026
@leodido leodido merged commit 9f36c6c into main May 4, 2026
6 checks passed
@leodido leodido deleted the ci/goreleaser-version-2-header branch May 4, 2026 00:41
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.

1 participant