This repository has been archived by the owner on May 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
.goreleaser.yml
65 lines (59 loc) · 1.57 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
before:
hooks:
# to avoid goreleaser error due to `make deps` on CI: git is currently in a dirty state
# we should never see go.mod be dirty because we `go build -mod=readonly`, but we can't well control go.sum updates
- git checkout go.sum
builds:
- binary: '{{ .ProjectName }}_{{ .Version }}'
flags:
- -mod=readonly
ldflags:
- -s -w -X main.version={{ .Version }}
gcflags:
- all=-trimpath={{ .Env.GOPATH }}
asmflags:
- all=-trimpath={{ .Env.GOPATH }}
goos:
- linux
- darwin
- windows
- freebsd
goarch:
- amd64
- '386'
- arm
- arm64
ignore:
- goos: darwin
goarch: '386'
env:
- CGO_ENABLED=0
# https://goreleaser.com/customization/build/#reproducible-builds
mod_timestamp: '{{ .CommitTimestamp }}'
archives:
- name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
format: zip
files:
- README.md
- LICENSE
- legal/**/*
checksum:
# This suffix is required for Terraform Registry
# https://www.terraform.io/docs/registry/providers/publishing.html#manually-preparing-a-release
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
signs:
- artifacts: checksum
cmd: gpg
args: ['--batch', '-u', '{{ .Env.GPG_FINGERPRINT }}', '--output', '${signature}', '--detach-sign', '${artifact}']
stdin: '{{ .Env.GPG_PASSWORD }}'
changelog:
sort: asc
filters:
exclude:
- '^chore:'
- '[ci skip]$'
- make fmt
- fix go.sum
- go mod tidy
release:
draft: true