1
1
archives :
2
2
- files :
3
- - none*
3
+ # Ensure only built binary is archived
4
+ - ' none*'
4
5
format : zip
5
6
name_template : ' {{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
6
7
before :
7
8
hooks :
8
- - go mod download
9
+ - ' go mod download'
9
10
builds :
10
- - binary : ' {{ .ProjectName }}_{{ .Version }}'
11
+ - # Binary naming only required for Terraform CLI 0.12
12
+ binary : ' {{ .ProjectName }}_v{{ .Version }}_x5'
13
+ env :
14
+ - CGO_ENABLED=0
11
15
flags :
12
16
- -trimpath
13
- goarch :
14
- - ' 386'
15
- - amd64
16
- - arm
17
- - arm64
18
17
goos :
19
18
- darwin
20
19
- freebsd
21
20
- linux
22
21
- windows
22
+ goarch :
23
+ - ' 386'
24
+ - amd64
25
+ - arm
26
+ - arm64
23
27
ignore :
24
- - goarch : ' 386'
25
- goos : darwin
28
+ - goarch : arm
29
+ goos : windows
30
+ - goarch : arm64
31
+ goos : freebsd
32
+ - goarch : arm64
33
+ goos : windows
26
34
ldflags :
27
- - -s -w -X version.ProviderVersion ={{.Version}}
35
+ - -s -w -X main.Version ={{.Version}}
28
36
mod_timestamp : ' {{ .CommitTimestamp }}'
29
- changelog :
30
- skip : true
31
37
checksum :
32
- name_template : ' {{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
33
38
algorithm : sha256
34
- env :
35
- - CGO_ENABLED=0
39
+ extra_files :
40
+ - glob : ' terraform-registry-manifest.json'
41
+ name_template : ' {{ .ProjectName }}_{{ .Version }}_manifest.json'
42
+ name_template : ' {{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
43
+ publishers :
44
+ - checksum : true
45
+ # Terraform CLI 0.10 - 0.11 perform discovery via HTTP headers on releases.hashicorp.com
46
+ # For providers which have existed since those CLI versions, exclude
47
+ # discovery by setting the protocol version headers to 5.
48
+ cmd : hc-releases upload-file {{ abs .ArtifactPath }} -header=x-terraform-protocol-version=5 -header=x-terraform-protocol-versions=5.0
49
+ env :
50
+ - AWS_ACCESS_KEY_ID={{ .Env.AWS_ACCESS_KEY_ID }}
51
+ - AWS_SECRET_ACCESS_KEY={{ .Env.AWS_SECRET_ACCESS_KEY }}
52
+ - AWS_SESSION_TOKEN={{ .Env.AWS_SESSION_TOKEN }}
53
+ extra_files :
54
+ - glob : ' terraform-registry-manifest.json'
55
+ name_template : ' {{ .ProjectName }}_{{ .Version }}_manifest.json'
56
+ name : hc-releases
57
+ signature : true
36
58
release :
37
- disable : true
59
+ extra_files :
60
+ - glob : ' terraform-registry-manifest.json'
61
+ name_template : ' {{ .ProjectName }}_{{ .Version }}_manifest.json'
62
+ ids :
63
+ - none
38
64
signs :
39
- - artifacts : checksum
40
- args :
41
- - " --batch"
42
- - " --local-user"
43
- - " {{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
44
- - " --output"
45
- - " ${signature}"
46
- - " --detach-sign"
47
- - " ${artifact}"
65
+ - args : ["sign", "--dearmor", "--file", "${artifact}", "--out", "${signature}"]
66
+ artifacts : checksum
67
+ cmd : signore
68
+ signature : ${artifact}.sig
69
+ - args : ["sign", "--dearmor", "--file", "${artifact}", "--out", "${signature}"]
70
+ artifacts : checksum
71
+ cmd : signore
72
+ id : key-id
73
+ signature : ${artifact}.72D7468F.sig
74
+ snapshot :
75
+ name_template : " {{ .Tag }}-next"
0 commit comments