-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yaml
541 lines (460 loc) · 16.1 KB
/
.goreleaser.yaml
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
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 2
before:
hooks:
- go mod tidy
- go generate ./...
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
brews:
- name: commonmeta
# Git author used to commit to the repository.
commit_author:
name: goreleaserbot
email: [email protected]
# Repository to push the generated files to.
repository:
# Repository owner.
#
# Templates: allowed.
owner: front-matter
# Repository name.
#
# Templates: allowed.
name: homebrew-commonmeta
nfpms:
# note that this is an array of nfpm configs
- #
# ID of the nfpm config, must be unique.
#
# Default: 'default'.
id: commonmeta
# Name of the package.
#
# Default: ProjectName.
# Templates: allowed.
# package_name: foo
# You can change the file name of the package.
#
# Default: '{{ .PackageName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'.
# Templates: allowed.
file_name_template: "{{ .ConventionalFileName }}"
# Build IDs for the builds you want to create NFPM packages for.
# Default: '' (no filtering).
# builds:
# - foo
# - bar
# Allows to further filter the artifacts.
#
# Artifacts that do not match this expression will be ignored.
#
# This feature is only available in GoReleaser Pro..
# Since: v2.4.
# Templates: allowed.
# if: '{{ eq .Os "linux" }}'
# Your app's vendor.
vendor: Front Matter
# Your app's homepage.
#
# Default: inferred from global metadata.
homepage: https://commonmeta.org/
# Your app's maintainer (probably you).
#
# Default: inferred from global metadata.
maintainer: Martin Fenner <[email protected]>
# Your app's description.
#
# Default: inferred from global metadata.
# description: |-
# Drum rolls installer package.
# Software to create fast and easy drum rolls.
# Your app's license.
#
# Default: inferred from global metadata.
# license: Apache 2.0
# Formats to be generated.
formats:
- apk
- deb
- rpm
# Umask to be used on files without explicit mode set. (overridable)
#
# Default: 0o002 (will remove world-writable permissions).
# umask: 0o002
# Packages your package depends on. (overridable)
# dependencies:
# - git
# - zsh
# Packages it provides. (overridable)
# provides:
# - bar
# Packages your package recommends installing. (overridable)
# recommends:
# - bzr
# - gtk
# Packages your package suggests installing. (overridable)
# suggests:
# - cvs
# - ksh
# Packages that conflict with your package. (overridable)
# conflicts:
# - svn
# - bash
# Packages it replaces. (overridable)
# replaces:
# - fish
# Path that the binaries should be installed.
#
# Default: '/usr/bin'.
# bindir: /usr/bin
# Paths to the directories where to put specific types of libraries that
# GoReleaser built.
#
# This should be used together with `builds.buildmode`
#
# Templates: allowed.
# libdirs:
# # Default: '/usr/include'.
# headers: /usr/include/something
# # Default: '/usr/lib'.
# cshared: /usr/lib/foo
# # Default: '/usr/lib'.
# carchive: /usr/lib/foobar
# Version Epoch.
#
# Default: extracted from `version` if it is semver compatible.
# epoch: 2
# Version Prerelease.
#
# Default: extracted from `version` if it is semver compatible.
# prerelease: beta1
# Version Metadata (previously deb.metadata).
# Setting metadata might interfere with version comparisons depending on the
# packager.
#
# Default: extracted from `version` if it is semver compatible.
# version_metadata: git
# Version Release.
# release: 1
# Section.
# section: default
# Priority.
# priority: extra
# Makes a meta package - an empty package that contains only supporting
# files and dependencies.
# When set to `true`, the `builds` option is ignored.
# meta: true
# Changelog YAML file, see: https://github.com/goreleaser/chglog
#
# You can use goreleaser/chglog to create the changelog for your project,
# pass that changelog yaml file to GoReleaser,
# and it should in turn setup it accordingly for the given available
# formats (deb and rpm at the moment).
#
# Experimental.
# changelog: ./foo.yml
# Contents to add to the package.
# GoReleaser will automatically add the binaries.
# contents:
# Basic file that applies to all packagers
# - src: path/to/foo
# dst: /usr/bin/foo
# This will add all files in some/directory or in subdirectories at the
# same level under the directory /etc. This means the tree structure in
# some/directory will not be replicated.
# - src: some/directory/
# dst: /etc
# This will replicate the directory structure under some/directory at
# /etc, using the "tree" type.
#
# Templates: allowed.
# - src: some/directory/
# dst: /etc
# type: tree
# file_info:
# # File mode.
# mode: 0644
# # Modification time.
# #
# # Templates: allowed (since v2.6).
# mtime: "{{.CommitDate}}"
# # Owner name.
# #
# # Templates: allowed (since v2.6).
# owner: notRoot
# # Group name.
# #
# # Templates: allowed (since v2.6).
# group: notRoot
# Simple config file
# - src: path/to/foo.conf
# dst: /etc/foo.conf
# type: config
# Simple symlink.
# Corresponds to `ln -s /sbin/foo /usr/local/bin/foo`
# - src: /sbin/commonmeta
# dst: /usr/bin/commonmeta
# type: "symlink"
# Corresponds to `%config(noreplace)` if the packager is rpm, otherwise it
# is just a config file
# - src: path/to/local/bar.conf
# dst: /etc/bar.conf
# type: "config|noreplace"
# The src and dst attributes also supports name templates
# - src: path/{{ .Os }}-{{ .Arch }}/bar.conf
# dst: /etc/foo/bar-{{ .ProjectName }}.conf
# Additional templated contents to add to the archive.
# Those files will have their contents pass through the template engine,
# and its results will be added to the package.
#
# This feature is only available in GoReleaser Pro.
# Templates: allowed.
# templated_contents:
# # a more complete example, check the globbing deep dive below
# - src: "LICENSE.md.tpl"
# dst: LICENSE.md
# These files are not actually present in the package, but the file names
# are added to the package header. From the RPM directives documentation:
#
# "There are times when a file should be owned by the package but not
# installed - log files and state files are good examples of cases you
# might desire this to happen."
#
# "The way to achieve this, is to use the %ghost directive. By adding this
# directive to the line containing a file, RPM will know about the ghosted
# file, but will not add it to the package."
#
# For non rpm packages ghost files are ignored at this time.
# - dst: /etc/casper.conf
# type: ghost
# - dst: /var/log/boo.log
# type: ghost
# You can use the packager field to add files that are unique to a
# specific packager
# - src: path/to/rpm/file.conf
# dst: /etc/file.conf
# type: "config|noreplace"
# packager: rpm
# - src: path/to/deb/file.conf
# dst: /etc/file.conf
# type: "config|noreplace"
# packager: deb
# - src: path/to/apk/file.conf
# dst: /etc/file.conf
# type: "config|noreplace"
# packager: apk
# Sometimes it is important to be able to set the mtime, mode, owner, or
# group for a file that differs from what is on the local build system at
# build time.
# - src: path/to/foo
# dst: /usr/local/foo
# file_info:
# # File mode.
# mode: 0644
# # Modification time.
# #
# # Templates: allowed (since v2.6).
# mtime: "{{.CommitDate}}"
# # Owner name.
# #
# # Templates: allowed (since v2.6).
# owner: notRoot
# # Group name.
# #
# # Templates: allowed (since v2.6).
# group: notRoot
# If `dst` ends with a `/`, it'll create the given path and copy the given
# `src` into it, the same way `cp` works with and without trailing `/`.
# - src: ./foo/bar/*
# dst: /usr/local/myapp/
# Using the type 'dir', empty directories can be created. When building
# RPMs, however, this type has another important purpose: Claiming
# ownership of that directory. This is important because when upgrading or
# removing an RPM package, only the directories for which it has claimed
# ownership are removed. However, you should not claim ownership of a
# directory that is created by the OS or a dependency of your package.
#
# A directory in the build environment can optionally be provided in the
# 'src' field in order copy mtime and mode from that directory without
# having to specify it manually.
# - dst: /some/dir
# type: dir
# file_info:
# mode: 0700
# Scripts to execute during the installation of the package. (overridable)
#
# Keys are the possible targets during the installation process
# Values are the paths to the scripts which will be executed.
#
# Templates: allowed.
# scripts:
# preinstall: "scripts/preinstall.sh"
# postinstall: "scripts/postinstall.sh"
# preremove: "scripts/preremove.sh"
# postremove: "scripts/postremove.sh"
# Templated scripts to execute during the installation of the package. (overridable)
#
# Keys are the possible targets during the installation process
# Values are the paths to the scripts which will be executed.
#
# This feature is only available in GoReleaser Pro.
# Templates: allowed.
# templated_scripts:
# preinstall: "scripts/preinstall.sh"
# postinstall: "scripts/postinstall.sh"
# preremove: "scripts/preremove.sh"
# postremove: "scripts/postremove.sh"
# Date to be used as mtime for the package itself, and its internal files.
# You may also want to set the mtime on its contents.
#
# Since: v2.6.
# Templates: allowed.
mtime: "{{ .CommitDate }}"
# All fields above marked as `overridable` can be overridden for a given
# package format in this section.
# overrides:
# # The dependencies override can for example be used to provide version
# # constraints for dependencies where different package formats use
# # different versions or for dependencies that are named differently.
# deb:
# dependencies:
# - baz (>= 1.2.3-0)
# - some-lib-dev
# # ...
# rpm:
# dependencies:
# - baz >= 1.2.3-0
# - some-lib-devel
# # ...
# apk:
# ...
# Custom configuration applied only to the RPM packager.
# rpm:
# RPM specific scripts.
# scripts:
# # The pretrans script runs before all RPM package transactions / stages.
# pretrans: ./scripts/pretrans.sh
# # The posttrans script runs after all RPM package transactions / stages.
# posttrans: ./scripts/posttrans.sh
# The package summary.
#
# Default: first line of the description.
# summary: Explicit Summary for Sample Package
# The package group.
# This option is deprecated by most distros but required by old distros
# like CentOS 5 / EL 5 and earlier.
# group: Unspecified
# The packager is used to identify the organization that actually packaged
# the software, as opposed to the author of the software.
# `maintainer` will be used as fallback if not specified.
# This will expand any env var you set in the field, eg packager: ${PACKAGER}
# packager: GoReleaser <[email protected]>
# Compression algorithm (gzip (default), lzma or xz).
# compression: lzma
# Prefixes for relocatable packages.
# prefixes:
# - /usr/bin
# The package is signed if a key_file is set
# signature:
# PGP secret key file path (can also be ASCII-armored).
#
# See "Signing key passphrases" below for more information.
#
# Templates: allowed.
# key_file: "{{ .Env.GPG_KEY_PATH }}"
# Custom configuration applied only to the Deb packager.
# deb:
# Lintian overrides
# lintian_overrides:
# - statically-linked-binary
# - changelog-file-missing-in-native-package
# Custom deb special files.
# scripts:
# # Deb rules script.
# rules: foo.sh
# # Deb templates file, when using debconf.
# templates: templates
# Custom deb triggers
# triggers:
# # register interest on a trigger activated by another package
# # (also available: interest_await, interest_noawait)
# interest:
# - some-trigger-name
# # activate a trigger for another package
# # (also available: activate_await, activate_noawait)
# activate:
# - another-trigger-name
# Packages which would break if this package would be installed.
# The installation of this package is blocked if `some-package`
# is already installed.
# breaks:
# - some-package
# The package is signed if a key_file is set
# signature:
# # PGP secret key file path (can also be ASCII-armored).
# #
# # See "Signing key passphrases" below for more information.
# #
# # Templates: allowed.
# key_file: "{{ .Env.GPG_KEY_PATH }}"
# The type describes the signers role, possible values are "origin",
# "maint" and "archive".
#
# Default: 'origin'.
# type: origin
# Additional fields for the control file. Empty fields are ignored.
# This will expand any env vars you set in the field values, e.g. Vcs-Browser: ${CI_PROJECT_URL}
# fields:
# Bugs: https://github.com/goreleaser/nfpm/issues
# The Debian-specific "predepends" field can be used to ensure the complete installation of a list of
# packages (including unpacking, pre- and post installation scripts) prior to the installation of the
# built package.
# predepends:
# - baz (>= 1.2.3-0)
# apk:
# APK specific scripts.
# scripts:
# # The preupgrade script runs before APK upgrade.
# preupgrade: ./scripts/preupgrade.sh
# # The postupgrade script runs after APK.
# postupgrade: ./scripts/postupgrade.sh
# The package is signed if a key_file is set
# signature:
# # PGP secret key file path (can also be ASCII-armored).
# #
# # See "Signing key passphrases" below for more information.
# #
# # Templates: allowed.
# key_file: "{{ .Env.GPG_KEY_PATH }}"
# The name of the signing key. When verifying a package, the signature
# is matched to the public key store in /etc/apk/keys/<key_name>.rsa.pub.
#
# Default: maintainer's email address.
# Templates: allowed.
# key_name: origin