Repository navigation
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
736 lines (639 loc) · 21.2 KB
/
Copy path.goreleaser.yaml
File metadata and controls
736 lines (639 loc) · 21.2 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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
# Copyright (c) 2024-2025 Six After, Inc.
#
# This source code is licensed under the Apache 2.0 License found in the
# LICENSE file in the root directory of this source tree.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=jcroql
version: 2
snapshot:
version_template: "{{ incpatch .Version }}-alpha"
# Ref: https://goreleaser.com/customization/builds/
project_name: nanoid
# Ref: https://goreleaser.com/customization/changelog/
changelog:
# Sorts the changelog by the commit's messages.
# Could either be asc, desc or empty
# Empty means 'no sorting', it'll use the output of `git log` as is.
sort: asc
# Changelog generation implementation to use.
#
# Valid options are:
# - `git`: uses `git log`;
# - `github`: uses the compare GitHub API, appending the author username to the changelog.
# - `gitlab`: uses the compare GitLab API, appending the author name and email to the changelog (requires a personal access token).
# - `gitea`: uses the compare Gitea API, appending the author username to the changelog.
# - `github-native`: uses the GitHub release notes generation API, disables the groups feature.
#
# Default: 'git'.
use: github
# Format to use for commit formatting.
#
# Templates: allowed.
#
# Default:
# if 'git': '{{ .SHA }} {{ .Message }}'
# otherwise: '{{ .SHA }}: {{ .Message }} ({{ with .AuthorUsername }}@{{ . }}{{ else }}{{ .AuthorName }} <{{ .AuthorEmail }}>{{ end }})'.
#
# Extra template fields:
# - `SHA`: the commit SHA1
# - `Message`: the first line of the commit message, otherwise known as commit subject
# - `AuthorName`: the author full name (considers mailmap if 'git')
# - `AuthorEmail`: the author email (considers mailmap if 'git')
# - `AuthorUsername`: github/gitlab/gitea username - not available if 'git'
#
# Usage with 'git': Since: v2.8.
format: "{{.SHA}}: {{.Message}} (@{{.AuthorUsername}})"
# Max commit hash length to use in the changelog.
#
# 0: use whatever the changelog implementation gives you
# -1: remove the commit hash from the changelog
# any other number: max length.
abbrev: 0
filters:
# Commit messages matching the regexp listed here will be the only ones
# added to the changelog
#
# If include is not-empty, exclude will be ignored.
#
# Matches are performed against the first line of the commit message only,
# prefixed with the commit SHA1, usually in the form of
# `<abbrev-commit>[:] <title-commit>`.
include:
- "(?i)^feature:"
- "(?i)^defect:"
- "(?i)^debt:"
- "(?i)^risk:"
# Group commits messages by given regex and title.
# Order value defines the order of the groups.
# Providing no regex means all commits will be grouped under the default group.
#
# Matches are performed against the first line of the commit message only,
# prefixed with the commit SHA1, usually in the form of
# `<abbrev-commit>[:] <title-commit>`.
# Groups are disabled when using github-native, as it already groups things by itself.
# Regex use RE2 syntax as defined here: https://github.com/google/re2/wiki/Syntax.
groups:
- title: "🎉 Features"
regexp: '(?i)^.*?feature(\([[:word:]]+\))??!?:.+$'
order: 0
- title: "🛠 Defects"
regexp: '(?i)^.*?defect(\([[:word:]]+\))??!?:.+$'
order: 1
- title: "⚖️ Technical Debt"
regexp: '(?i)^.*?debt(\([[:word:]]+\))??!?:.+$'
order: 1
- title: "⚠️ Technical Risk"
regexp: '(?i)^.*?risk(\([[:word:]]+\))??!?:.+$'
order: 1
- title: Others
order: 999
# Ref: https://goreleaser.com/customization/builds/
builds:
# You can have multiple builds defined as a yaml list
- id: nanoid
# Path to main.go file or main package.
# Notice: when used with `gomod.proxy`, this must be a package.
#
# Default: `.`.
main: main.go
# Binary name.
# Can be a path (e.g. `bin/app`) to wrap the binary in a directory.
#
# Default: Project directory name.
binary: nanoid
# Custom ldflags.
#
# Default: '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser'.
# Templates: allowed.
ldflags:
- -s -w -X github.com/sixafter/nanoid-cli/cmd/version.version={{ .Version }} -X github.com/sixafter/nanoid-cli/cmd/version.gitCommitID={{ .Env.X_BUILD_COMMIT }}
# Set the modified timestamp on the output binary, typically
# you would do this to ensure a build was reproducible.
# Pass an empty string to skip modifying the output.
#
# Templates: allowed.
mod_timestamp: "{{ .CommitTimestamp }}"
# GOOS list to build for.
# For more info refer to: https://go.dev/doc/install/source#environment
#
# Default: [ 'darwin', 'linux', 'windows' ].
goos:
- 'darwin'
- 'linux'
- 'windows'
- 'freebsd'
# GOARCH to build for.
# For more info refer to: https://go.dev/doc/install/source#environment
#
# Default: [ '386', 'amd64', 'arm64' ].
goarch:
- 'amd64'
- 'arm'
- 'arm64'
- '386'
- 'loong64'
- 'mips64le'
- 's390x'
- 'ppc64le'
# GOAMD64 to build when GOARCH is amd64.
# For more info refer to: https://go.dev/doc/install/source#environment
#
# Valid values are v1 (default), v2, v3, v4.
# See the Go wiki MinimumRequirements page for more information:
# https://go.dev/wiki/MinimumRequirements#amd64
# Default: [ 'v1' ].
goamd64:
- 'v1'
# GOARM to specify which 32-bit arm version to use if there are multiple
# versions from the build section. Brew formulas support only one 32-bit
# version.
#
# Default: 6.
#goarm:
# - '7'
goarm:
- '6'
- '7'
ignore:
- goos: 'darwin'
goarch: '386'
- goos: 'windows'
goarch: 'arm'
- goos: 'freebsd'
goarch: 'arm'
- goos: 'freebsd'
goarch: 'arm64'
- goos: 'freebsd'
goarch: '386'
# Set a specific go binary to use when building.
# It is safe to ignore this option in most cases.
#
# Default: "go".
# Templates: allowed.
# gobinary: "go1.23.3"
flags:
- -trimpath
checksum:
name_template: 'checksums.txt'
# Ref: https://goreleaser.com/customization/sign/
# Ref: https://goreleaser.com/blog/cosign-v3/
signs:
- id: checksums
cmd: cosign
stdin: '{{ .Env.COSIGN_PASSWORD }}'
output: true
artifacts: checksum
signature: "${artifact}.sigstore.json"
args:
- sign-blob
- --yes
- --key
- env://COSIGN_PRIVATE_KEY
- "--bundle=${signature}"
- '${artifact}'
- id: binaries
cmd: cosign
stdin: '{{ .Env.COSIGN_PASSWORD }}'
output: true
artifacts: archive
signature: "${artifact}.sigstore.json"
args:
- sign-blob
- --yes
- --key
- env://COSIGN_PRIVATE_KEY
- "--bundle=${signature}"
- '${artifact}'
# Ref: https://goreleaser.com/customization/archive/
archives:
- id: tar
# Archive format.
#
# If format is `binary`, no archives are created and the binaries are instead
# uploaded directly.
#
# Valid options are:
# - `tar.gz`
# - `tgz`
# - `tar.xz`
# - `txz`
# - `tar.zst`
# - `tzst` (since v2.1)
# - `tar`
# - `gz`
# - `zip`
# - `binary`
#
# Default: 'tar.gz'.
formats: [tar.gz]
# Additional files/globs you want to add to the archive.
#
# Default: [ 'LICENSE*', 'README*', 'CHANGELOG', 'license*', 'readme*', 'changelog'].
# Templates: allowed.
files:
- LICENSE
- README.md
- CHANGELOG/CHANGELOG*
- id: zip
# Archive format.
#
# If format is `binary`, no archives are created and the binaries are instead
# uploaded directly.
#
# Valid options are:
# - `tar.gz`
# - `tgz`
# - `tar.xz`
# - `txz`
# - `tar.zst`
# - `tzst` (since v2.1)
# - `tar`
# - `gz`
# - `zip`
# - `binary`
#
# Default: 'tar.gz'.
formats: [zip]
# Additional files/globs you want to add to the archive.
#
# Default: [ 'LICENSE*', 'README*', 'CHANGELOG', 'license*', 'readme*', 'changelog'].
# Templates: allowed.
files:
- LICENSE
- README.md
- CHANGELOG/CHANGELOG*
# Ref: https://goreleaser.com/customization/release/
release:
# Repo in which the release will be created.
# Default: extracted from the origin remote URL or empty if its private hosted.
github:
owner: sixafter
name: nanoid-cli
# You can change the name of the release.
#
# Default: '{{.Tag}}' ('{{.PrefixedTag}}' on Pro).
# Templates: allowed.
name_template: 'v{{ .Version }}'
# Footer for the release body.
#
# Templates: allowed.
footer: |
**Full Changelog**: [CHANGELOG.md](https://github.com/sixafter/nanoid-cli/tree/main/CHANGELOG/CHANGELOG-1.x.md)
# Ref: https://goreleaser.com/customization/homebrew_casks/
#homebrew_casks:
# Ref: https://goreleaser.com/customization/homebrew/
brews:
# Name of the recipe
- name: nanoid
#alternative_names:
# - "nanoid@{{ .Major }}.{{ .Minor }}"
# IDs of the archives to use.
# Empty means all IDs.
# ids:
# - tar
# IDs of the archives to use.
# Empty means all IDs.
ids:
- tar
# Templates: allowed.
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
# URL which is determined by the given Token (github, gitlab or gitea).
# url_template: "https://github.com/sixafter/nanoid-cli/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
# Directory inside the repository to put the formula.
directory: Formula
# Your app's homepage.
#
# Default: inferred from global metadata.
homepage: "https://github.com/sixafter/homebrew-nanoid-cli/"
# Your app's description.
#
# Templates: allowed.
# Default: inferred from global metadata.
description: "A simple, fast, and concurrent command-line tool for generating secure, URL-friendly unique string IDs using the NanoID Go implementation."
license: "Apache 2.0"
# Repository to push the generated files to.
repository:
# Repository owner.
#
# Templates: allowed.
owner: sixafter
# Repository name.
#
# Templates: allowed.
name: homebrew-tap
# Optionally a branch can be provided.
#
# Default: default repository branch.
# Templates: allowed.
# Example: "{{.ProjectName}}-{{.Version}}"
# branch: main
branch: main
# Optionally a token can be provided, if it differs from the token
# provided to GoReleaser
#
# Templates: allowed.
token: "{{ .Env.X_GITHUB_TOKEN }}"
# Sets up pull request creation instead of just pushing to the given branch.
# Make sure the 'branch' property is different from base before enabling
# it.
pull_request:
# Whether to enable it or not.
enabled: false
# Whether to open the PR as a draft or not.
draft: true
# Base can also be another repository, in which case the owner and name
# above will be used as HEAD, allowing cross-repository pull requests.
base:
owner: sixafter
name: homebrew-tap
branch: main
# Ref: https://goreleaser.com/customization/homebrew_casks/
homebrew_casks:
-
# Name of the cask
#
# Default: the project name.
# Templates: allowed.
name: nanoid
# Alternative names for the current cask.
#
# Useful if you want to publish a versioned cask as well, so users can
# more easily downgrade.
#
# This feature is only available in GoReleaser Pro.
# Templates: allowed.
#alternative_names:
# - nanoid@{{ .Version }}
# - nanoid@{{ .Major }}
# IDs of the archives to use.
# Empty means all IDs.
ids:
- tar
# Binary name inside the cask
#
# Default: the cask name.
# Templates: allowed.
binary: nanoid
# App to use instead of the binary.
# This will then make GoReleaser use only the DMG files instead of archives.
#
# Pro only.
# Templates: allowed.
#app: NanoID.app
# Path to the manpage file
#
# Templates: allowed.
#manpage: man/nanoid.1
# Completions for different shells
#
# Templates: allowed.
#completions:
# bash: completions/nanoid.bash
# zsh: completions/nanoid.zsh
# fish: completions/nanoid.fish
# This information will be used to build the URL section of your Cask.
#
# You can set the template, as well as additional parameters.
# These parameters can be used to provide extra headers, cookies, or other
# download requirements for your application.
# See https://docs.brew.sh/Cask-Cookbook#additional-url-parameters for more details.
#
# All fields are optional.
url:
# URL which is determined by the given Token (github, gitlab or gitea).
#
# Default depends on the client.
# Templates: allowed.
template: "https://github.com/sixafter/nanoid-cli/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
# Used when the domains of `url` and `homepage` differ.
# Templates: allowed.
#
# Deprecated by Homebrew (>= 7.0): `brew` warns on the `verified` parameter
# and ignores it, directing casks to the default URL verification behaviour.
#verified: "github.com/sixafter/nanoid-cli/"
# Download strategy or format specification
# See official Cask Cookbook for allowed values.
# Templates: allowed.
using: ":homebrew_curl"
# HTTP cookies to send with the download request
# Templates: allowed.
#cookies:
# license: "accept-backup"
# HTTP referer header
# Templates: allowed.
#referer: "https://example.com/download-page"
# Additional HTTP headers
# Templates: allowed.
#headers:
# - "X-Version: {{ .Version }}"
# Custom User-Agent header
# Templates: allowed.
#user_agent: "NanoID/1.0 (macOS)"
# Custom body when using POST request
# Templates: allowed.
#data:
# format: "dmg"
# platform: "mac"
# Git author used to commit to the repository.
# Templates: allowed.
commit_author:
name: goreleaserbot
email: bot@goreleaser.com
# The project name and current git tag are used in the format string.
#
# Templates: allowed.
commit_msg_template: "Brew cask update for {{ .ProjectName }} version {{ .Tag }}"
# Directory inside the repository to put the cask.
# Default: Casks
directory: Casks
# Caveats for the user of your binary.
#caveats: "How to use this binary"
# Your app's homepage.
#
# Default: inferred from global metadata.
homepage: "https://github.com/sixafter/homebrew-nanoid-cli/"
# Your app's description.
#
# Templates: allowed.
# Default: inferred from global metadata.
description: "A simple, fast, and concurrent command-line tool for generating secure, URL-friendly unique string IDs using the NanoID Go implementation."
# Setting this will prevent goreleaser to actually try to commit the updated
# cask - instead, the cask file will be stored on the dist directory
# only, leaving the responsibility of publishing it to the user.
# If set to auto, the release will not be uploaded to the homebrew tap
# in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1
#
# Templates: allowed.
#skip_upload: true
# Custom block for brew.
# Can be used to specify alternate downloads for devel or head releases.
#custom_block: |
# head "https://github.com/some/package.git"
# ...
# Dependencies for the cask.
#dependencies:
# - cask: some-cask
# - formula: some-formula
# Packages that conflict with your cask.
#conflicts:
# - cask: some-cask
# - formula: some-formula
# Hooks for the cask lifecycle.
#hooks:
# pre:
# install: |
# system_command "/usr/bin/defaults", args: ["write", "com.example.app", "key", "value"]
# uninstall: |
# system_command "/usr/bin/defaults", args: ["delete", "com.example.app"]
# post:
# install: |
# system_command "/usr/bin/open", args: ["#{appdir}/NanoID.app"]
# uninstall: |
# system_command "/usr/bin/rm", args: ["-rf", "~/.nanoid"]
# Relative path to a Service that should be moved into the
# ~/Library/Services folder on installation.
#service: "nanoid.service"
# Additional procedures for a more complete uninstall, including user files
# and shared resources.
#zap:
# launchctl:
# - "com.sixafter.nanoid.service"
# quit:
# - "com.sixafter.nanoid"
# login_item:
# - "com.sixafter.nanoid"
# trash:
# - "~/.nanoid"
# - "~/otherfile"
# delete:
# - "~/.nanoid"
# - "~/otherfile"
# Procedures to uninstall a cask.
# Optional unless a pkg or installer artifact stanza is used.
#uninstall:
# launchctl:
# - "com.sixafter.nanoid.service"
# quit:
# - "com.sixafter.nanoid"
# login_item:
# - "com.sixafter.nanoid"
# trash:
# - "~/.nanoid"
# - "~/otherfile"
# delete:
# - "~/.nanoid"
# - "~/otherfile"
# Repository to push the generated files to.
repository:
# Repository owner.
#
# Templates: allowed.
owner: sixafter
# Repository name.
#
# Templates: allowed.
name: homebrew-tap
# Optionally a branch can be provided.
#
# Default: default repository branch.
# Templates: allowed.
branch: main
# Optionally a token can be provided, if it differs from the token
# provided to GoReleaser
#
# Templates: allowed.
token: "{{ .Env.X_GITHUB_TOKEN }}"
# Optionally specify if this is a token from another SCM, allowing to
# cross-publish.
#
# Only taken into account if `token` is set.
#
# Valid options:
# - 'github'
# - 'gitlab'
# - 'gitea'
#
# This feature is only available in GoReleaser Pro.
#token_type: "github"
# Sets up pull request creation instead of just pushing to the given branch.
# Make sure the 'branch' property is different from base before enabling
# it.
#
# This might require a personal access token.
pull_request:
# Whether to enable it or not.
enabled: false
# Whether to open the PR as a draft or not.
draft: true
# If the pull request template has checkboxes, enabling this will
# check all of them.
#
# This feature is only available in GoReleaser Pro, and when the pull
# request is being opened on GitHub.
# check_boxes: true
# Base can also be another repository, in which case the owner and name
# above will be used as HEAD, allowing cross-repository pull requests.
base:
owner: sixafter
name: homebrew-tap
branch: main
# Clone, create the file, commit and push, to a regular Git repository.
#
# Notice that this will only have any effect if the given URL is not
# empty.
#git:
# url: 'ssh://git@github.com:sixafter/homebrew-tap.git'
# private_key: '{{ .Env.PRIVATE_KEY_PATH }}'
# ssh_command: 'ssh -i {{ .Env.KEY }} -o SomeOption=yes'
notarize:
macos:
- # Whether this configuration is enabled or not.
#
# Default: false.
# Templates: allowed.
enabled: '{{ isEnvSet "SIXAFTER_MACOS_SIGN_P12" }}'
# IDs to use to filter the built binaries.
#
# Default: the project name.
ids:
- nanoid
# Before notarizing, we need to sign the binary.
# This block defines the configuration for doing so.
sign:
# The .p12 certificate file path or its base64'd contents.
#
# Templates: allowed.
certificate: "{{.Env.SIXAFTER_MACOS_SIGN_P12}}"
# The password to be used to open the certificate.
#
# Templates: allowed.
password: "{{.Env.SIXAFTER_MACOS_SIGN_PASSWORD}}"
# Then, we notarize the binaries.
#
# You can leave this section empty if you only want
# to sign the binaries (Since: v2.1).
notarize:
# The issuer ID.
# Its the UUID you see when creating the App Store Connect key.
#
# Templates: allowed.
issuer_id: "{{.Env.SIXAFTER_MACOS_NOTARY_ISSUER_ID}}"
# Key ID.
# You can see it in the list of App Store Connect Keys.
# It will also be in the ApiKey filename.
#
# Templates: allowed.
key_id: "{{.Env.SIXAFTER_MACOS_NOTARY_KEY_ID}}"
# The .p8 key file path or its base64'd contents.
#
# Templates: allowed.
key: "{{.Env.SIXAFTER_MACOS_NOTARY_KEY}}"
# Whether to wait for the notarization to finish.
# Not recommended, as it could take a really long time.
wait: true
# Timeout for the notarization.
# Beware of the overall `--timeout` time.
# This only has any effect if `wait` is true.
#
# Default: 10m.
timeout: 20m