generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 59
/
.goreleaser.yml
86 lines (85 loc) · 2.18 KB
/
.goreleaser.yml
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
77
78
79
80
81
82
83
84
85
86
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
archives:
- files:
# Ensure only built binary and license file are archived
- src: 'LICENSE'
dst: 'LICENSE.txt'
format: zip
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
builds:
- env:
- CGO_ENABLED=0
flags:
- -trimpath
goos:
- darwin
- freebsd
- linux
- windows
goarch:
- '386'
- amd64
- arm
- arm64
ignore:
- goarch: arm
goos: windows
- goarch: arm64
goos: freebsd
- goarch: arm64
goos: windows
ldflags:
- -s -w -X internal/provider.Version={{.Version}}
mod_timestamp: '{{ .CommitTimestamp }}'
checksum:
extra_files:
- glob: 'terraform-registry-manifest.json'
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
algorithm: sha256
publishers:
- name: upload
checksum: true
extra_files:
- glob: 'terraform-registry-manifest.json'
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
signature: true
cmd: |
hc-releases upload -product {{ .ProjectName }} -version {{ .Version }} -file={{ .ArtifactPath }}={{ .ArtifactName }}
env:
- HC_RELEASES_HOST={{ .Env.HC_RELEASES_HOST }}
- HC_RELEASES_KEY={{ .Env.HC_RELEASES_KEY }}
release:
extra_files:
- glob: 'terraform-registry-manifest.json'
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
ids:
- none
signs:
# Default Signature file (i.e. terraform-provider-awscc_VERSION_SHA256SUMS.sig)
- cmd: sh
args:
- -c
- >-
signore
sign
--dearmor
--file ${artifact}
--out ${signature}
artifacts: checksum
# Signature file with GPG Public Key ID in filename (i.e. terraform-provider-awscc_VERSION_SHA256SUMS.7685B676.sig)
- id: sig-with-gpg-public-key-id
signature: ${artifact}.72D7468F.sig
cmd: sh
args:
- -c
- >-
signore
sign
--dearmor
--file ${artifact}
--out ${signature}
artifacts: checksum
snapshot:
name_template: "{{ .Tag }}-next"