Repository navigation
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
92 lines (83 loc) · 2.69 KB
/
Copy path.goreleaser.yaml
File metadata and controls
92 lines (83 loc) · 2.69 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# GoReleaser builds every release from a v* tag (#61): static binaries,
# archives with the license and docs, a combined checksums.txt, SBOMs, and a
# keyless cosign signature over the checksums. CI also runs it in snapshot
# mode on every push to main, so this file is exercised before a tag needs it.
version: 2
project_name: subenum
before:
hooks:
- go mod verify
# Shell completions and the man page, generated from the flags (#88).
- go run . generate-assets build/assets
# Licence notices of the Go standard library and every linked module,
# read from the module cache (#326).
- go run ./tools/licenses -o build/THIRD_PARTY_LICENSES
builds:
- id: subenum
main: .
binary: subenum
# Static, reproducible binaries: no cgo (#46), no local paths, no debug
# info. The tag (v1.2.3) is stamped into -version.
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- -s -w -X main.Version={{ .Tag }}
mod_timestamp: "{{ .CommitTimestamp }}"
goos: [linux, darwin, windows, freebsd]
goarch: [amd64, arm64, "386"]
ignore:
- goos: darwin
goarch: "386"
- goos: windows
goarch: "386"
- goos: freebsd
goarch: "386"
archives:
- id: default
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
formats: [tar.gz]
format_overrides:
- goos: windows
formats: [zip]
files:
- LICENSE
- src: build/THIRD_PARTY_LICENSES
strip_parent: true
- README.md
- CHANGELOG.md
- src: build/assets/completions/*
dst: completions
- src: build/assets/man/*
dst: man
checksum:
name_template: checksums.txt
algorithm: sha256
# One SPDX SBOM per archive (needs syft on PATH).
sboms:
- artifacts: archive
# Keyless signing: the workflow's OIDC identity signs checksums.txt, which in
# turn covers every archive. Verify with cosign verify-blob (see README).
signs:
- cmd: cosign
artifacts: checksum
signature: "${artifact}.sigstore.json"
args:
- sign-blob
- "--bundle=${signature}"
- "${artifact}"
- "--yes"
# Release notes come from the tag's CHANGELOG.md section (--release-notes).
changelog:
disable: true
release:
github:
owner: TMHSDigital
name: subenum
prerelease: auto
# Published by the workflow after provenance is attested.
draft: true
footer: |
**Verify a download:** `sha256sum --ignore-missing -c checksums.txt`, and check the signature with
`cosign verify-blob --bundle checksums.txt.sigstore.json --certificate-identity-regexp 'https://github.com/TMHSDigital/subenum/' --certificate-oidc-issuer https://token.actions.githubusercontent.com checksums.txt`.