-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
278 lines (249 loc) · 9.69 KB
/
Copy path.goreleaser.yaml
File metadata and controls
278 lines (249 loc) · 9.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
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
version: 2
project_name: fontget
dist: dist
before:
hooks:
- go mod tidy
# Generate Windows resources (icon, version info) for Windows builds.
# Wrapped in sh -c so || true is applied; otherwise hook fails on Linux when build/winres.json is missing.
- sh -c "go-winres make --in build/winres.json --out rsrc --file-version git-tag --product-version git-tag || true"
builds:
- id: fontget
main: .
binary: fontget
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w
- -X fontget/internal/version.Version={{.Version}}
- -X fontget/internal/version.GitCommit={{.Commit}}
- -X fontget/internal/version.BuildDate={{.Date}}
archives:
# Per-platform archives (zip on Windows, tar.gz elsewhere). Consumed by self-update
# (go-github-selfupdate), winget, homebrew, chocolatey, and install scripts.
- id: default
ids:
- fontget
format_overrides:
- goos: windows
formats:
- zip
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
checksum:
name_template: "checksums.txt"
algorithm: sha256
# Source tarball required by aur_sources (PKGBUILD builds from this on Arch).
source:
enabled: true
snapshot:
version_template: "{{ .Tag }}-SNAPSHOT"
changelog:
use: git
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- "^Release:"
- "^ci:"
- "^chore:"
- "^fix: .*workflow"
- "^fix: .*goreleaser"
- "^fix: .*chocolatey"
- "^fix: .*winget"
- "^fix: .*aur"
# Linux packages via NFPM (deb/rpm)
nfpms:
- id: linux-packages
ids:
- fontget
package_name: fontget
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Arch }}"
formats:
- deb
- rpm
maintainer: "Graphixa <https://github.com/Graphixa>"
description: "FontGet CLI tool for managing fonts"
license: "MIT"
vendor: "Graphixa"
homepage: "https://github.com/Graphixa/FontGet"
section: utils
bindir: /usr/bin
# GoReleaser automatically filters to Linux builds and includes binaries from 'builds'
# The binary will be placed in /usr/bin/fontget
# Homebrew Cask (macOS)
# Using homebrew_casks instead of deprecated brews (since GoReleaser v2.10)
homebrew_casks:
- name: fontget
repository:
owner: Graphixa
name: homebrew-tap
branch: main
token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
homepage: "https://github.com/Graphixa/FontGet"
description: "A tiny, cross-platform CLI tool to install and manage fonts from the command line. Search for fonts, list installed fonts, install or remove fonts all from the CLI."
license: "MIT"
# Use the default archive (darwin builds only)
# GoReleaser will automatically filter to darwin archives
ids:
- default
binaries:
- fontget
# Remove quarantine attribute to allow execution on macOS
# This is required for unsigned binaries from GitHub releases
hooks:
post:
install: |
if OS.mac?
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/fontget"]
end
# Scoop bucket (Windows)
# Using repository instead of deprecated bucket field
scoops:
- name: fontget
repository:
owner: Graphixa
name: scoop-bucket
branch: main
token: "{{ .Env.SCOOP_BUCKET_TOKEN }}"
homepage: "https://github.com/Graphixa/FontGet"
description: "A tiny, cross-platform CLI tool to install and manage fonts from the command line. Search for fonts, list installed fonts, install or remove fonts all from the CLI."
license: "MIT"
# Chocolatey (Windows)
# Skipped in workflow (--skip=chocolatey). Nupkg is built on the Windows runner from build/chocolatey/; checksum injected at pack time.
# skip_publish: true — we push from the chocolatey job with dotnet nuget push.
chocolateys:
- name: fontget
ids:
- default
skip_publish: true
api_key: "{{ .Env.CHOCOLATEY_API_KEY }}"
title: "FontGet"
owners: "Graphixa"
authors: "Graphixa"
project_url: "https://github.com/Graphixa/FontGet"
package_source_url: "https://github.com/Graphixa/FontGet"
description: "A tiny, cross-platform CLI tool to install and manage fonts from the command line. Search for fonts, list installed fonts, install or remove fonts all from the CLI."
summary: "Install and manage fonts from the command line"
tags: "fonts font-manager cli cross-platform"
license_url: "https://github.com/Graphixa/FontGet/blob/main/LICENSE"
release_notes: "https://github.com/Graphixa/FontGet/releases/tag/v{{ .Version }}"
bug_tracker_url: "https://github.com/Graphixa/FontGet/issues"
docs_url: "https://github.com/Graphixa/FontGet/blob/main/README.md"
icon_url: "https://raw.githubusercontent.com/Graphixa/FontGet/main/assets/icons/icon.png"
# Winget (Windows) - Automated PRs to microsoft/winget-pkgs
winget:
- name: fontget
# Publisher name (required)
publisher: Graphixa
# Required fields
short_description: "A tiny, cross-platform CLI tool to install and manage fonts from the command line"
license: "mit" # License name (lowercase, e.g., "mit", "apache-2.0")
# IDs of the archives to use (empty means all IDs)
# We use the default archive which contains Windows builds
ids:
- default
# GOAMD64 to specify which amd64 version to use if there are multiple versions
# Default: 'v1' (we only build one amd64 version, so default is fine)
goamd64: v1
# Package identifier (Publisher.PackageName convention)
package_identifier: Graphixa.FontGet
# Commit message template
# Templates: allowed
commit_msg_template: "{{ .PackageIdentifier }}: {{ .Tag }}"
# URL template for downloading the installer/archive
# Default for GitHub: https://github.com/<owner>/<repo>/releases/download/{{ .Tag }}/{{ .ArtifactName }}
# We're explicit here to ensure it matches our archive naming: fontget_<version>_windows_<arch>.zip
url_template: "https://github.com/Graphixa/FontGet/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
# Path for manifests inside the repository
# manifests/<first letter of publisher>/<publisher>/<package>/<version>
# Templates: allowed
path: manifests/g/Graphixa/FontGet/{{.Version}}
# Optional but recommended fields
homepage: "https://github.com/Graphixa/FontGet"
description: "A tiny, cross-platform CLI tool to install and manage fonts from the command line. Search for fonts, list installed fonts, install or remove fonts all from the CLI."
license_url: "https://github.com/Graphixa/FontGet/blob/main/LICENSE"
publisher_url: "https://github.com/Graphixa"
publisher_support_url: "https://github.com/Graphixa/FontGet/issues"
# Release notes - use changelog content generated by GoReleaser
# Templates: allowed
release_notes: "{{.Changelog}}"
# Release notes URL (separate from release_notes content)
# Templates: allowed
release_notes_url: "https://github.com/Graphixa/FontGet/releases/tag/v{{.Version}}"
# Copyright information (optional but recommended)
copyright: "Copyright (c) Graphixa"
copyright_url: "https://github.com/Graphixa/FontGet/blob/main/LICENSE"
# Installation notes (optional but helpful for users)
installation_notes: "FontGet will be installed to your PATH. Run 'fontget --help' to get started."
# Tags (GoReleaser converts to lowercase and replaces spaces with hyphens)
# Used for discoverability in winget search
tags:
- fonts
- font-management
- nerd-fonts
- google-fonts
- font-manager
- cli
- command-line
- cross-platform
- utility
- typography
- terminal
# Repository configuration for your fork
repository:
# Your fork of microsoft/winget-pkgs
owner: Graphixa # Your GitHub username or organization
name: winget-pkgs
# Feature branch for each release (different from base branch)
branch: "fontget-{{ .Version }}"
# Use personal access token from GitHub secret
token: "{{ .Env.WINGET_PR_TOKEN }}"
# Enable pull request creation
pull_request:
enabled: true
# Open PR as ready for review (fully automated)
draft: false
# Base repository (where the PR will be opened)
base:
owner: microsoft
name: winget-pkgs
branch: master # microsoft/winget-pkgs uses 'master' as default branch
# AUR (Arch Linux) - Automated source-based package (since GoReleaser v2.5)
aur_sources:
- name: fontget
homepage: "https://github.com/Graphixa/FontGet"
description: "A tiny, cross-platform CLI tool to install and manage fonts from the command line"
maintainers:
- "Graphixa <https://github.com/Graphixa>"
license: "MIT"
private_key: "{{ .Env.AUR_PRIVATE_KEY }}"
git_url: "ssh://aur@aur.archlinux.org/fontget.git"
makedepends:
- go
- git
depends:
- glibc
prepare: |-
cd "${pkgname}_${pkgver}"
go mod download
build: |-
cd "${pkgname}_${pkgver}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
go build -ldflags="-w -s -buildid='' -linkmode=external -X fontget/internal/version.Version=${pkgver}" -o fontget .
package: |-
cd "${pkgname}_${pkgver}"
install -Dm755 ./fontget "${pkgdir}/usr/bin/fontget"
commit_msg_template: "Update to {{ .Tag }}"