-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
144 lines (128 loc) · 3.78 KB
/
.goreleaser.yaml
File metadata and controls
144 lines (128 loc) · 3.78 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
# GoReleaser configuration for basecamp
# Docs: https://goreleaser.com
version: 2
project_name: basecamp
before:
hooks:
# PGO profile should be generated by release workflow before GoReleaser runs
- sh -c 'if [ -f default.pgo ]; then echo "PGO profile found ($(du -h default.pgo | cut -f1))"; else echo "No PGO profile - build will use standard optimization"; fi'
- sh -c 'mkdir -p completions && go run ./cmd/basecamp completion bash > completions/basecamp.bash && go run ./cmd/basecamp completion zsh > completions/_basecamp && go run ./cmd/basecamp completion fish > completions/basecamp.fish'
builds:
- id: basecamp
main: ./cmd/basecamp
binary: basecamp
env:
- CGO_ENABLED=0
goos:
- darwin
- linux
- windows
- freebsd
- openbsd
goarch:
- amd64
- arm64
# PGO: Use profile if available (Go 1.21+)
flags:
- -pgo=auto
ldflags:
- -s -w
- -X github.com/basecamp/basecamp-cli/internal/version.Version={{.Version}}
- -X github.com/basecamp/basecamp-cli/internal/version.Commit={{.Commit}}
- -X github.com/basecamp/basecamp-cli/internal/version.Date={{.Date}}
archives:
- id: default
formats:
- tar.gz
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
format_overrides:
- goos: windows
formats:
- zip
files:
- LICENSE*
- MIT-LICENSE
- README*
- completions/*
checksum:
name_template: 'checksums.txt'
algorithm: sha256
# Generate SBOM for supply chain transparency
sboms:
- artifacts: archive
# Sign checksums with cosign (keyless via Sigstore)
# Requires: permissions.id-token: write in workflow for OIDC
signs:
- cmd: cosign
signature: '${artifact}.bundle'
args:
- sign-blob
- '--bundle=${signature}'
- '${artifact}'
- '--yes'
artifacts: checksum
output: true
# Sign and notarize macOS binaries (cross-platform via embedded quill)
notarize:
macos:
- enabled: '{{ and .Env.MACOS_SIGN_P12 .Env.MACOS_SIGN_PASSWORD .Env.MACOS_NOTARY_KEY .Env.MACOS_NOTARY_KEY_ID .Env.MACOS_NOTARY_ISSUER_ID }}'
ids:
- basecamp
sign:
certificate: "{{.Env.MACOS_SIGN_P12}}"
password: "{{.Env.MACOS_SIGN_PASSWORD}}"
notarize:
issuer_id: "{{.Env.MACOS_NOTARY_ISSUER_ID}}"
key_id: "{{.Env.MACOS_NOTARY_KEY_ID}}"
key: "{{.Env.MACOS_NOTARY_KEY}}"
wait: true
timeout: 20m
changelog:
# Use GitHub's auto-generated release notes (categories configured in .github/release.yml)
use: github-native
release:
github:
owner: basecamp
name: basecamp-cli
draft: false
prerelease: auto
name_template: "{{.ProjectName}} v{{.Version}}"
header: |
{{ if .Env.RELEASE_CHANGELOG }}{{ .Env.RELEASE_CHANGELOG }}
---
{{ end }}
### Install
**macOS:**
```sh
brew install --cask basecamp/tap/basecamp
basecamp auth login
```
**Arch Linux / Omarchy:**
```sh
yay -S basecamp-cli
basecamp auth login
```
**Other platforms:** download the matching archive from the assets below.
homebrew_casks:
- name: basecamp
repository:
owner: basecamp
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
directory: Casks
homepage: "https://github.com/basecamp/basecamp-cli"
description: "Command-line interface for Basecamp"
binaries:
- basecamp
skip_upload: auto
scoops:
- name: basecamp
repository:
owner: basecamp
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
homepage: "https://github.com/basecamp/basecamp-cli"
description: "Command-line interface for Basecamp"
license: MIT
skip_upload: auto
# AUR publishing handled by scripts/publish-aur.sh (GoReleaser enforces -bin suffix)