Skip to content

Commit 6776d13

Browse files
authored
Update .goreleaser following the current docs
1 parent 26a1e00 commit 6776d13

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.goreleaser.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1+
# Visit https://goreleaser.com for documentation on how to customize this
2+
# behavior.
3+
before:
4+
hooks:
5+
# this is just an example and not a requirement for provider building/publishing
6+
- go mod tidy
17
builds:
28
- env:
9+
# goreleaser does not work with CGO, it could also complicate
10+
# usage by users in CI/CD systems like Terraform Cloud where
11+
# they are unable to install libraries.
312
- CGO_ENABLED=0
413
mod_timestamp: '{{ .CommitTimestamp }}'
514
flags:
@@ -24,17 +33,28 @@ archives:
2433
- format: zip
2534
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
2635
checksum:
36+
extra_files:
37+
- glob: 'terraform-registry-manifest.json'
38+
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
2739
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
2840
algorithm: sha256
2941
signs:
3042
- artifacts: checksum
3143
args:
44+
# if you are using this in a GitHub action or some other automated pipeline, you
45+
# need to pass the batch flag to indicate its not interactive.
3246
- "--batch"
3347
- "--local-user"
34-
- "{{ .Env.GPG_FINGERPRINT }}"
48+
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
3549
- "--output"
3650
- "${signature}"
3751
- "--detach-sign"
3852
- "${artifact}"
53+
release:
54+
extra_files:
55+
- glob: 'terraform-registry-manifest.json'
56+
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
57+
# If you want to manually examine the release before its live, uncomment this line:
58+
# draft: true
3959
changelog:
4060
skip: true

0 commit comments

Comments
 (0)