GoReleaser "goreleaser check" config validation fails in CI
The goreleaser check command validates .goreleaser.yaml without building. It fails when a field is invalid, deprecated, or required-but-missing, catching config problems before a real release.
What this error means
A goreleaser check step exits non-zero with "invalid config" or "config is valid, but has deprecations" listing the fields to fix.
• checking config file
⨯ 1 configuration file(s) invalid
⨯ command failed error=invalid config: deprecated field `builds.ldflags` usedCommon causes
A deprecated field is still used
GoReleaser marks superseded keys as deprecated; check fails so you migrate before they are removed.
A required field is missing or malformed
An incomplete builds, archives, or release section fails validation before any artifact is produced.
How to fix it
Read the check output and migrate
- Run
goreleaser checkand note each flagged field. - Replace deprecated keys with their current equivalents.
- Re-run until it reports the config is valid.
goreleaser checkGate check before release in CI
Run check as an early step so config errors fail fast instead of during publish.
- uses: goreleaser/goreleaser-action@v6
with:
args: checkHow to prevent it
- Run
goreleaser checkon every pull request that touches the config. - Address deprecations promptly, before they become hard errors.
- Keep the config aligned with the pinned GoReleaser version.