generated from hashicorp/packer-plugin-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 21
/
.goreleaser.yml
71 lines (64 loc) · 1.66 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
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
# See http://goreleaser.com
version: 2
builds:
- id: build
mod_timestamp: "{{ .CommitTimestamp }}"
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- -s
- -w
- -X {{ .ModulePath }}/version.Version={{ .Version }}
- -X {{ .ModulePath }}/version.VersionPrerelease={{- if .IsSnapshot -}}dev+{{ .ShortCommit }}{{- end -}}
binary: >-
{{- if .IsSnapshot -}}
{{ replace .ProjectName "-" "_" }}_{{ .Os }}_{{ .Arch }}
{{- else -}}
{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}
{{- end -}}
targets:
- linux_386
- linux_amd64_v1
- linux_arm_6
- linux_arm64
- freebsd_386
- freebsd_amd64_v1
- freebsd_arm
- netbsd_386
- netbsd_amd64_v1
- netbsd_arm
- openbsd_386
- openbsd_amd64_v1
- openbsd_arm
- solaris_amd64_v1
- darwin_amd64_v1
- darwin_arm64
- windows_386
- windows_amd64_v1
snapshot:
name_template: "{{ .Version }}-dev+{{ .ShortCommit }}"
archives:
- format: zip
files:
- none*
name_template: >-
{{- if .IsSnapshot -}}
{{ replace .ProjectName "-" "_" }}_{{ .Os }}_{{ .Arch }}
{{- else -}}
{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}
{{- end -}}
checksum:
name_template: "{{ .ProjectName }}_v{{ .Version }}_SHA256SUMS"
algorithm: sha256
signs:
- artifacts: checksum
args:
- --batch
- --local-user={{ .Env.GPG_FINGERPRINT }}
- --output=${signature}
- --detach-sign
- ${artifact}