Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve go releaser config #857

Merged
merged 3 commits into from
Dec 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 27 additions & 19 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand All @@ -43,4 +51,4 @@ signs:
- "--detach-sign"
- "${artifact}"
changelog:
skip: true
sort: asc