-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yml
More file actions
76 lines (69 loc) · 2.15 KB
/
Copy path.goreleaser.yml
File metadata and controls
76 lines (69 loc) · 2.15 KB
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
# GoReleaser config for publishing terraform-provider-busbar to the Terraform
# Registry. The registry requires: multi-arch archives named
# terraform-provider-{name}_{version}_{os}_{arch}.zip, a SHA256SUMS file, a
# GPG-signed SHA256SUMS.sig, and the terraform-registry-manifest.json packaged as
# {name}_{version}_manifest.json.
#
# Signing needs a GPG private key imported into the runner and the key
# fingerprint in the GPG_FINGERPRINT env var (see .github/workflows/release.yml).
version: 2
before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath
ldflags:
- "-s -w -X main.version={{ .Version }}"
goos:
- linux
- darwin
- windows
- freebsd
goarch:
- amd64
- arm64
- arm
- "386"
ignore:
- goos: darwin
goarch: arm
- goos: darwin
goarch: "386"
- goos: windows
goarch: arm
binary: "{{ .ProjectName }}_v{{ .Version }}"
archives:
- formats: [zip]
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
checksum:
# The registry manifest MUST be checksummed into SHA256SUMS (and it is release.extra_files
# below), or the Terraform Registry rejects the version with "missing SHA256 checksum for
# ..._manifest.json". checksum.extra_files adds it to SHA256SUMS before signing.
extra_files:
- glob: "terraform-registry-manifest.json"
name_template: "{{ .ProjectName }}_{{ .Version }}_manifest.json"
name_template: "{{ .ProjectName }}_{{ .Version }}_SHA256SUMS"
algorithm: sha256
signs:
- artifacts: checksum
args:
# If signing fails, verify the GPG key is imported and GPG_FINGERPRINT is set.
- "--batch"
- "--local-user"
- "{{ .Env.GPG_FINGERPRINT }}"
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
release:
extra_files:
- glob: "terraform-registry-manifest.json"
name_template: "{{ .ProjectName }}_{{ .Version }}_manifest.json"
# Registry publishing consumes GitHub releases; leave drafts off so the webhook fires.
draft: false
changelog:
disable: true