forked from natrontech/pbs-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
82 lines (73 loc) · 1.8 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
version: 2
project_name: pbs-exporter
before:
hooks:
- go mod tidy
builds:
- id: pbs-exporter
binary: '{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}'
# set for reproducible builds
mod_timestamp: '{{ .CommitTimestamp }}'
env:
- CGO_ENABLED=0
goarch:
- amd64
- arm64
goos:
- linux
- windows
- darwin
flags:
- -trimpath
- -tags="netgo"
ldflags:
- >-
-s
-w
-X main.Version={{ .Tag }}
-X main.Commit={{ .Commit }}
-X main.BuildTime={{ .Date }}
archives:
- format: tar.gz
name_template: '{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}'
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
# create sboms for the archives
sboms:
- artifacts: archive
args: ["$artifact", "--output", "cyclonedx-json=$document"]
# create checksum file for the archives
checksum:
name_template: 'checksums.txt'
algorithm: sha256
# sign checksum file (cosign keyless)
signs:
- cmd: cosign
args:
- "sign-blob"
- "--output-signature=${signature}"
- "${artifact}"
- "--output-certificate=${certificate}"
- "--yes"
artifacts: checksum
certificate: '${artifact}.pem'
release:
# allow pre-release versions (e.g. by tagging with v1.0.0-rc0)
prerelease: auto
draft: true
footer: |
**Full Changelog**: https://github.com/natrontech/{{ .ProjectName }}/compare/{{ .PreviousTag }}...{{ .Tag }}
**Docker Images**
- `ghcr.io/natrontech/{{ .ProjectName }}:v{{ .Version }}`
{{ if not .Prerelease }}- `ghcr.io/natrontech/{{ .ProjectName }}:latest`{{ end }}
# github changelog for new release
changelog:
sort: asc
use: github
filters:
exclude:
- '^test:'
- '^rebase:'
- Merge pull request