Skip to content

Commit 232395f

Browse files
committed
chore(gh): goreleaser v2
- Use GoReleaser configuration to v2 without deprecated items. - Uses the recommended order. - Add `.goreleaser.yml` for use by a release workflow. - Add the `terraform-registry-manifest.json` needed for the release workflow. Signed-off-by: Ryan Johnson <[email protected]>
1 parent da9f5c7 commit 232395f

File tree

3 files changed

+47
-33
lines changed

3 files changed

+47
-33
lines changed

.goreleaser.tmpl

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Release {{ .Version }} ({{ .Date }})

.goreleaser.yml

+40-33
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
1+
---
12
version: 2
3+
4+
project_name: terraform-provider-vcfa
5+
26
before:
3-
hooks:
4-
- go mod tidy
7+
hooks:
8+
- go mod tidy
9+
510
builds:
6-
- env:
7-
# goreleaser does not work with CGO, it could also complicate
8-
# usage by users in CI/CD systems like Terraform Cloud where
9-
# they are unable to install libraries.
10-
- CGO_ENABLED=0
11-
mod_timestamp: '{{ .CommitTimestamp }}'
12-
flags:
13-
- -trimpath
14-
ldflags:
15-
- '-s -w -X github.com/vmware/terraform-provider-vcfa/vcfa.BuildVersion={{.Env.BUILDVERSION}}'
11+
- id: default
12+
binary: '{{ .ProjectName }}_v{{ .Version }}'
1613
goos:
17-
- freebsd
18-
- windows
1914
- linux
15+
- windows
2016
- darwin
17+
- freebsd
2118
goarch:
2219
- amd64
2320
- '386'
@@ -26,31 +23,41 @@ builds:
2623
ignore:
2724
- goos: darwin
2825
goarch: '386'
29-
binary: '{{ .ProjectName }}_v{{ .Version }}'
26+
env:
27+
- CGO_ENABLED=0
28+
flags:
29+
- -trimpath
30+
ldflags:
31+
- '-s -w -X github.com/vmware/terraform-provider-vcfa/vcfa.BuildVersion={{.Env.BUILDVERSION}}'
32+
mod_timestamp: '{{ .CommitTimestamp }}'
33+
3034
archives:
31-
- format: zip
35+
- id: default
3236
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
37+
formats: ['zip']
38+
3339
checksum:
34-
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
35-
algorithm: sha256
40+
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
41+
algorithm: sha256
42+
3643
signs:
37-
- artifacts: checksum
38-
args:
39-
# if you are using this is a GitHub action or some other automated pipeline, you
40-
# need to pass the batch flag to indicate its not interactive.
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}"
44+
- id: default
45+
artifacts: checksum
46+
args:
47+
- "--batch"
48+
- "--local-user"
49+
- "{{ .Env.GPG_FINGERPRINT }}"
50+
- "--output"
51+
- "${signature}"
52+
- "--detach-sign"
53+
- "${artifact}"
54+
4855
release:
49-
# Visit your project's GitHub Releases page to publish this release.
50-
draft: true
56+
draft: true
57+
5158
changelog:
52-
filters:
53-
exclude:
59+
filters:
60+
exclude:
5461
- '^docs:'
5562
- '^test:'
5663
- Merge pull request

terraform-registry-manifest.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"version": 1,
3+
"metadata": {
4+
"protocol_versions": ["5.0"]
5+
}
6+
}

0 commit comments

Comments
 (0)