Skip to content
Latchkey

GoReleaser "unsupported GOOS/GOARCH pair" in CI

GoReleaser expands goos x goarch into a build matrix. If a combination is not a valid Go target (or your Go version does not support it), the build fails with "unsupported GOOS/GOARCH pair".

What this error means

GoReleaser stops with "go: unsupported GOOS/GOARCH pair <os>/<arch>" for a target like windows/arm or darwin/386.

Terminal
  ⨯ build failed  error=failed to build for darwin_386:
  go: unsupported GOOS/GOARCH pair darwin/386
  exit status 1

Common causes

An invalid os/arch combination

Not every goos x goarch pair is a real Go target; for example darwin/386 is not supported.

A target dropped in a newer Go version

Some pairs were removed as Go evolved, so a matrix that once built now includes an invalid target.

How to fix it

Exclude the invalid pair

  1. List the valid pairs with go tool dist list.
  2. Add an ignore entry for the unsupported combination in the build.
  3. Re-run so only valid targets are built.
.goreleaser.yaml
builds:
  - goos: [linux, darwin, windows]
    goarch: ['386', amd64, arm64]
    ignore:
      - goos: darwin
        goarch: '386'

Verify targets against the toolchain

Cross-check your matrix against the Go version in CI, since supported pairs change between releases.

Terminal
go tool dist list

How to prevent it

  • Generate the matrix from go tool dist list valid pairs.
  • Use ignore to prune combinations that do not apply.
  • Re-check targets when bumping the Go version.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →