-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
147 lines (133 loc) · 4.87 KB
/
Copy path.goreleaser.yaml
File metadata and controls
147 lines (133 loc) · 4.87 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# Copyright 2026 Bitwise Media Group Ltd.
# SPDX-License-Identifier: MIT
# GoReleaser config. Releases are cut by release-please: when its release PR merges,
# the reusable release workflow (.github/workflows/release.yaml) pushes the vX.Y.Z
# tag, leaves a draft GitHub release, and runs `goreleaser release` — which adopts
# that draft (use_existing_draft + mode: replace below). Build locally without
# publishing via `make snapshot`.
#
# Produces cross-platform binary archives + checksums + SBOMs + keyless cosign
# signatures, and pushes a Homebrew cask to bitwise-media-group/homebrew-tap. SBOMs
# are generated by the syft pinned in the make/ library (.syft-version), installed
# to .bin/ and put on PATH by whoever runs goreleaser (the library's snapshot and
# release targets locally, the reusable release workflow in CI). dotty drives
# local hardware and Homebrew, so no container images.
version: 2
# ^ref: https://goreleaser.com/errors/multiple-tokens/
force_token: github
project_name: dotty
before:
hooks:
- go mod download
env:
- CGO_ENABLED=0
builds:
- id: dotty
main: ./cmd
binary: dotty
flags:
- -trimpath
ldflags:
- -s -w
- -X github.com/bitwise-media-group/dotty/internal/version.Version={{ .Version }}
- -X github.com/bitwise-media-group/dotty/internal/version.Commit={{ .ShortCommit }}
- -X github.com/bitwise-media-group/dotty/internal/version.BuildDate={{ .Date }}
goos:
- linux
- darwin
goarch:
- amd64
- arm64
archives:
- id: dotty
formats: [tar.gz]
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- LICENSE
# Ship the man pages in the archive so the Homebrew cask can install
# them from the extracted tarball (see homebrew_casks.manpages below).
- docs/man/*.1
checksum:
name_template: checksums.txt
# ^ref: https://goreleaser.com/customization/sign/sign/
# Keyless cosign signatures over each built binary; the reusable release workflow
# supplies the GitHub Actions OIDC token. `make snapshot` skips this (--skip=sign).
binary_signs:
- cmd: cosign
signature: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}.sigstore.json"
args:
- sign-blob
- --bundle=${signature}
- ${artifact}
- --yes
output: true
sboms:
- artifacts: archive
# syft is installed from the make/ library's .syft-version pin into .bin/,
# which the library's snapshot/release targets put on PATH.
cmd: syft
args:
- $artifact
- --output
- spdx-json=$document
snapshot:
version_template: "{{ incpatch .Version }}-snapshot-{{ .ShortCommit }}"
changelog:
sort: asc
use: github
format: "{{ .SHA }}: {{ .Message }}{{ if and (not .IsNightly) .Logins }} ({{ .Logins | englishJoin }}){{ end }}"
filters:
exclude:
- "^test"
- "^chore"
- "^build"
groups:
- title: "New Features"
regexp: '^.*?feat(\(.+\))??!?:.+$'
order: 100
- title: "Security Updates"
regexp: '^.*?sec(\(.+\))??!?:.+$'
order: 150
- title: "Bug Fixes"
regexp: '^.*?(fix|refactor)(\(.+\))??!?:.+$'
order: 200
- title: "Documentation Updates"
regexp: ^.*?docs?(\(.+\))??!?:.+$
order: 400
- title: Other Work
order: 9999
release:
github:
owner: bitwise-media-group
name: dotty
# The release-please job in release.yaml leaves a draft release named after
# the tag it pushes. Adopt that draft instead of creating a second release,
# swap its release-please notes for the grouped changelog above, and
# undraft it only once every asset has been uploaded.
use_existing_draft: true
mode: replace
# ^ref: https://goreleaser.com/customization/homebrew_casks/
homebrew_casks:
- name: dotty
binaries: [dotty]
# Glob-matched against the files bundled into the archive above; goreleaser
# emits a `manpage "..."` stanza for each match (e.g. docs/man/dotty.1).
manpages:
- docs/man/*.1
generate_completions_from_executable:
executable: dotty
shell_parameter_format: cobra
homepage: https://github.com/bitwise-media-group/dotty
description: Terminal-driven dotfiles workflow — portable profiles, reproducible Brewfiles, and YubiKey-backed SSH signing keys
skip_upload: auto
repository:
owner: bitwise-media-group
name: homebrew-tap
branch: main
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
hooks:
pre:
install: |
if OS.mac?
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/dotty"]
end