goreleaser/goreleaser · error

unsupported arch: %q

Error message

unsupported arch: %q

What it means

Validation error in toPlatform: the artifact's goarch is not in the supported set (amd64, arm64, 386, ppc64le, s390x, riscv64, arm). Docker build context platform paths are only defined for those arches; anything else (e.g. loong64 in older versions, wasm) is rejected with the value quoted.

Source

Thrown at internal/pipe/docker/v2/docker.go:578

	switch a.Goos {
	case "linux", "windows":
		parts = append(parts, a.Goos)
	default:
		return "", fmt.Errorf("unsupported OS: %q", a.Goos)
	}
	switch a.Goarch {
	case "amd64", "arm64", "386", "ppc64le", "s390x", "riscv64":
		parts = append(parts, a.Goarch)
	case "arm":
		parts = append(parts, a.Goarch)
		switch a.Goarm {
		case "5", "6", "7":
			parts = append(parts, "v"+a.Goarm)
		default:
			return "", fmt.Errorf("unsupported arch: arm/v%q", a.Goarm)
		}
	default:
		return "", fmt.Errorf("unsupported arch: %q", a.Goarch)
	}
	return path.Join(parts...), nil
}

type platform struct {
	os, arch string
	arm      string
}

func parsePlatform(p string) platform {
	parts := strings.Split(p, "/")
	result := platform{
		os: parts[0],
	}
	if len(parts) >= 2 {
		result.arch = parts[1]
	}
	if len(parts) >= 3 {

View on GitHub (pinned to f5edd73956)

Solutions

  1. Use a supported goarch: amd64, arm64, 386, ppc64le, s390x, riscv64, or arm
  2. Fix the build matrix so artifacts have valid architecture metadata
  3. Filter out unsupported architectures from the docker image config
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at internal/pipe/docker/v2/docker.go:578 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of goreleaser/goreleaser@f5edd73956 (2026-09-05). Data as JSON: /api/errors/4efa4b4a7cd4b6b3. Report an issue: GitHub.