From bd9f6111b89d9c6c87f08c021160f2361ad69d6d Mon Sep 17 00:00:00 2001 From: Greg Poirier Date: Thu, 26 Sep 2024 16:27:39 -0400 Subject: [PATCH] fix(release): separate out the mac build --- .goreleaser.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 59f8526..c5e0987 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -6,6 +6,23 @@ before: - go mod tidy builds: +- id: mac + env: + # goreleaser does not work with CGO, it could also complicate + # usage by users in CI/CD systems like Terraform Cloud where + # they are unable to install libraries. + - CGO_ENABLED=0 + mod_timestamp: '{{ .CommitTimestamp }}' + flags: + - -trimpath + ldflags: + - '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}' + goos: + - darwin + goarch: + - amd64 + - arm64 + binary: '{{ .ProjectName }}_v{{ .Version }}' - id: linux env: # goreleaser does not work with CGO, it could also complicate @@ -20,15 +37,11 @@ builds: goos: - freebsd - linux - - darwin goarch: - amd64 - '386' - arm - arm64 - ignore: - - goos: darwin - goarch: '386' binary: '{{ .ProjectName }}_v{{ .Version }}' - id: windows env: