From 43303922ac74970cdbf583c2f79d64c4826925df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Edouard=20Br=C3=A9t=C3=A9ch=C3=A9?= Date: Wed, 14 Dec 2022 11:40:35 +0100 Subject: [PATCH] chore: improve go releaser config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Charles-Edouard Brétéché --- .goreleaser.yaml | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 9854d78e..1c8a23ae 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,11 +1,22 @@ -# before: -# hooks: -# - go mod tidy +project_name: terraform-provider-kops +before: + hooks: + - go mod download builds: - - main: ./cmd/terraform-provider-kops + - id: terraform-provider-kops + main: ./cmd/terraform-provider-kops + binary: '{{ .ProjectName }}_v{{ .Version }}' + mod_timestamp: '{{ .CommitTimestamp }}' env: - CGO_ENABLED=0 - mod_timestamp: '{{ .CommitTimestamp }}' + goos: + - freebsd + - windows + - linux + - darwin + goarch: + - amd64 + - arm64 flags: - -trimpath ldflags: @@ -15,26 +26,23 @@ builds: - -X 'github.com/eddycharly/terraform-provider-kops/pkg/version.BuildCommit={{.Commit}}' - -X 'github.com/eddycharly/terraform-provider-kops/pkg/version.BuildDate={{.Date}}' - -X 'github.com/eddycharly/terraform-provider-kops/pkg/version.BuiltBy=goreleaser' - goos: - - freebsd - - windows - - linux - - darwin - goarch: - - amd64 - - arm64 - binary: '{{ .ProjectName }}_v{{ .Version }}' archives: - - format: zip + - id: terraform-provider-kops + format: zip name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}' + builds: + - terraform-provider-kops + files: + - LICENSE checksum: name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS' algorithm: sha256 +release: + prerelease: auto signs: - - artifacts: checksum + - id: terraform-provider-kops + artifacts: checksum args: - # if you are using this is a GitHub action or some other automated pipeline, you - # need to pass the batch flag to indicate its not interactive. - "--batch" - "--local-user" - "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key @@ -43,4 +51,4 @@ signs: - "--detach-sign" - "${artifact}" changelog: - skip: true + sort: asc