GoReleaser "only configurations files on version: 2 are supported" in CI
GoReleaser v2 requires the config to declare version: 2 at the top level. A config without it (or with an older schema) is rejected until you add the version key and migrate renamed fields.
What this error means
GoReleaser fails at load with "only configurations files on version: 2 are supported, yours is version: 0, please update your configuration".
Terminal
⨯ only configurations files on version: 2 are supported, yours is version: 0,
please update your configurationCommon causes
Missing version: 2 declaration
A config that predates v2 has no version key, so GoReleaser v2 treats it as version 0 and refuses it.
Renamed fields not yet migrated
Some keys changed in v2 (for example archives.format became archives.formats), and the old shape no longer parses.
How to fix it
Add version: 2 and migrate
- Add
version: 2as the first line of.goreleaser.yaml. - Run
goreleaser checkto find any renamed or removed fields. - Update the flagged keys to their v2 names.
.goreleaser.yaml
version: 2
builds:
- env: [CGO_ENABLED=0]Pin the action to a compatible major
If you are not ready to migrate, pin the GoReleaser version so the schema stays stable, then migrate deliberately.
.github/workflows/release.yml
- uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
args: release --cleanHow to prevent it
- Declare
version: 2explicitly in every config. - Run
goreleaser checkafter upgrading GoReleaser. - Pin the GoReleaser major version in the action.
Related guides
GoReleaser ".goreleaser.yaml unknown field" unmarshal error in CIFix GoReleaser YAML unmarshal errors in CI - an unknown or misplaced field in .goreleaser.yaml fails to parse…
GoReleaser "goreleaser check" config validation fails in CIFix "goreleaser check" failures in CI - the config validation step reports deprecated, invalid, or missing fi…
GoReleaser "dist is not empty, use --clean" in CIFix GoReleaser "dist is not empty" in CI - the dist folder from a prior build remains, so GoReleaser refuses…