diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 43f7f9695..76c38d61b 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -13,28 +13,10 @@ builds: - CGO_ENABLED=0 goos: - linux - goarch: - - amd64 - - arm64 - # Set the modified timestamp on the output binary to the git timestamp (to ensure a reproducible build) - mod_timestamp: '{{ .CommitTimestamp }}' - ldflags: | - -w - -s - -extldflags '-static' - -X github.com/anchore/syft/internal/version.version={{.Version}} - -X github.com/anchore/syft/internal/version.gitCommit={{.Commit}} - -X github.com/anchore/syft/internal/version.buildDate={{.Date}} - -X github.com/anchore/syft/internal/version.gitTreeState={{.Env.BUILD_GIT_TREE_STATE}} - - - binary: syft - id: syft-win - env: - - CGO_ENABLED=0 - goos: - windows goarch: - amd64 + - arm64 # Set the modified timestamp on the output binary to the git timestamp (to ensure a reproducible build) mod_timestamp: '{{ .CommitTimestamp }}' ldflags: | @@ -68,14 +50,19 @@ builds: -X github.com/anchore/syft/internal/version.gitTreeState={{.Env.BUILD_GIT_TREE_STATE}} archives: - - format: tar.gz - builds: - - syft # i.e. Linux only + - name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' + id: syft + replacements: + windows: Windows + amd64: x86_64 + format_overrides: + - goos: windows + format: zip + - format: zip # This is a hack for syft-macos! We don't actually intend to use _this_ ZIP file, we just need goreleaser to consider the ZIP file produced by gon (which will have the same file name) to be an artifact so we can use it downstream in publishing (e.g. to a homebrew tap) - id: syft-zip + id: syft-exception builds: - syft-macos - - syft-win signs: - artifacts: checksum @@ -109,8 +96,11 @@ brews: - tap: owner: anchore name: homebrew-syft + ids: + - syft homepage: *website description: *description + license: "Apache License 2.0" dockers: - image_templates: