forked from confluentinc/terraform-provider-confluent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
113 lines (107 loc) · 2.82 KB
/
.goreleaser.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
before:
hooks:
# to avoid goreleaser error due to `make deps` on CI: git is currently in a dirty state
# we should never see go.mod be dirty because we `go build -mod=readonly`, but we can't well control go.sum updates
- git checkout go.sum
builds:
- binary: '{{ .ProjectName }}_{{ .Version }}'
id: "default"
flags:
- -mod=readonly
ldflags:
- -s -w -X main.version={{ .Version }}
gcflags:
- all=-trimpath={{ .Env.GOPATH }}
asmflags:
- all=-trimpath={{ .Env.GOPATH }}
goos:
- linux
- darwin
- windows
- freebsd
goarch:
- amd64
- '386'
- arm
- arm64
ignore:
- goos: darwin
goarch: '386'
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
env:
- CGO_ENABLED=0
# https://goreleaser.com/customization/build/#reproducible-builds
mod_timestamp: '{{ .CommitTimestamp }}'
- binary: '{{ .ProjectName }}_{{ .Version }}'
id: "linux-amd64-build"
flags:
- -mod=readonly
- -tags=netgo
ldflags:
- -s -w -X main.version={{ .Version }}
- -linkmode 'external' -extldflags '-static'
gcflags:
- all=-trimpath={{ .Env.GOPATH }}
asmflags:
- all=-trimpath={{ .Env.GOPATH }}
goos:
- linux
goarch:
- amd64
env:
- CGO_ENABLED=1
- GOEXPERIMENT=boringcrypto
# https://goreleaser.com/customization/build/#reproducible-builds
mod_timestamp: '{{ .CommitTimestamp }}'
- binary: '{{ .ProjectName }}_{{ .Version }}'
id: "linux-arm64-build"
flags:
- -mod=readonly
- -tags=netgo
ldflags:
- -s -w -X main.version={{ .Version }}
- -linkmode 'external' -extldflags '-static'
gcflags:
- all=-trimpath={{ .Env.GOPATH }}
asmflags:
- all=-trimpath={{ .Env.GOPATH }}
goos:
- linux
goarch:
- arm64
env:
- CGO_ENABLED=1
- GOEXPERIMENT=boringcrypto
- CC=aarch64-linux-gnu-gcc
# https://goreleaser.com/customization/build/#reproducible-builds
mod_timestamp: '{{ .CommitTimestamp }}'
archives:
- name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
format: zip
files:
- README.md
- LICENSE
- legal/**/*
checksum:
# This suffix is required for Terraform Registry
# https://www.terraform.io/docs/registry/providers/publishing.html#manually-preparing-a-release
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
signs:
- artifacts: checksum
cmd: gpg
args: ['--batch', '-u', '{{ .Env.GPG_FINGERPRINT }}', '--output', '${signature}', '--detach-sign', '${artifact}']
stdin: '{{ .Env.GPG_PASSWORD }}'
changelog:
sort: asc
filters:
exclude:
- '^chore:'
- '[ci skip]$'
- make fmt
- fix go.sum
- go mod tidy
release:
draft: true