Skip to content

Commit 913e358

Browse files
fix go releaser
1 parent 3d15147 commit 913e358

File tree

1 file changed

+36
-30
lines changed

1 file changed

+36
-30
lines changed

.goreleaser.yml

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,61 @@
1+
# Visit https://goreleaser.com for documentation on how to customize this
2+
# behavior.
13
version: 2
24
before:
35
hooks:
6+
# this is just an example and not a requirement for provider building/publishing
47
- go mod tidy
5-
68
builds:
7-
- env:
8-
- CGO_ENABLED=0
9-
mod_timestamp: '{{ .CommitTimestamp }}'
10-
flags:
11-
- -trimpath
12-
ldflags:
13-
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
14-
goos:
15-
- freebsd
16-
- windows
17-
- linux
18-
- darwin
19-
goarch:
20-
- amd64
21-
- '386'
22-
- arm
23-
- arm64
24-
ignore:
25-
- goos: darwin
26-
goarch: '386'
27-
binary: '{{ .ProjectName }}_v{{ .Version }}'
28-
9+
- env:
10+
# goreleaser does not work with CGO, it could also complicate
11+
# usage by users in CI/CD systems like HCP Terraform where
12+
# they are unable to install libraries.
13+
- CGO_ENABLED=0
14+
mod_timestamp: '{{ .CommitTimestamp }}'
15+
flags:
16+
- -trimpath
17+
ldflags:
18+
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
19+
goos:
20+
- freebsd
21+
- windows
22+
- linux
23+
- darwin
24+
goarch:
25+
- amd64
26+
- '386'
27+
- arm
28+
- arm64
29+
ignore:
30+
- goos: darwin
31+
goarch: '386'
32+
binary: '{{ .ProjectName }}_v{{ .Version }}'
2933
archives:
30-
- format: zip
31-
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
32-
34+
- format: zip
35+
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
3336
checksum:
37+
extra_files:
38+
- glob: 'terraform-registry-manifest.json'
39+
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
3440
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
3541
algorithm: sha256
36-
3742
signs:
3843
- artifacts: checksum
3944
args:
45+
# if you are using this in a GitHub action or some other automated pipeline, you
46+
# need to pass the batch flag to indicate its not interactive.
4047
- "--batch"
4148
- "--local-user"
42-
- "{{ .Env.GPG_FINGERPRINT }}"
49+
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
4350
- "--output"
4451
- "${signature}"
4552
- "--detach-sign"
4653
- "${artifact}"
47-
4854
release:
4955
extra_files:
5056
- glob: 'terraform-registry-manifest.json'
5157
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
58+
# If you want to manually examine the release before its live, uncomment this line:
5259
# draft: true
53-
5460
changelog:
5561
disable: true

0 commit comments

Comments
 (0)