Repository navigation
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
150 lines (137 loc) · 4.25 KB
/
Copy path.goreleaser.yaml
File metadata and controls
150 lines (137 loc) · 4.25 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
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
---
version: 2
project_name: git-bug
report_sizes: true
before:
hooks:
# The webui is compiled into the binary with //go:embed, behind the "webui"
# build tag (see //webui:assets.go). webui/dist is not tracked in git, so
# the frontend has to be built before the tagged build can succeed.
- pnpm --dir webui install --frozen-lockfile
- pnpm --dir webui run build
builds:
- id: git-bug
main: .
binary: git-bug
env:
- CGO_ENABLED=0
flags:
- -trimpath
tags:
# without this the binary has no web UI, and `git-bug webui` says so
- webui
ldflags:
# main.version is read by //:version.go. Everything else shown by
# `git-bug version` (commit, dirty, go version, os, arch) comes from the
# build metadata go stamps into the binary on its own.
- -s -w -X main.version=v{{ .Version }}
mod_timestamp: "{{ .CommitTimestamp }}"
targets:
- linux_amd64
- linux_arm64
- linux_arm_6
- linux_arm_7
- darwin_amd64
- darwin_arm64
- windows_amd64
- windows_arm64
- freebsd_amd64
- freebsd_arm64
- openbsd_amd64
- netbsd_amd64
archives:
# The primary artifact: an archive carrying the binary alongside the
# man pages and shell completions generated by `go generate`.
- id: archive
ids:
- git-bug
wrap_in_directory: true
formats:
- tar.gz
format_overrides:
- goos: windows
formats:
- zip
name_template: >-
{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}
files:
- README.md
- LICENSE
- INSTALLATION.md
- src: doc/man/*.1
dst: man
strip_parent: true
- src: misc/completion/*/git-bug
dst: completion
# Bare binaries, named exactly as the previous gox-based release named them,
# so existing download URLs (in particular
# /releases/latest/download/git-bug_<os>_<arch>) keep working.
- id: binary
ids:
- git-bug
formats:
- binary
name_template: >-
{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}
# Linux packages. These are the only channel we publish ourselves: Homebrew,
# AUR, nixpkgs, Scoop and the FreeBSD port are all maintained downstream by
# other people, and are deliberately left alone.
nfpms:
- id: packages
ids:
- git-bug
package_name: git-bug
# no version in the filename, so /releases/latest/download/ links work;
# package managers read the version from the package metadata anyway.
# nfpm adds the extension.
file_name_template: >-
{{ .PackageName }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}
vendor: git-bug
homepage: https://github.com/git-bug/git-bug
maintainer: Michael Muré <batolettre@gmail.com>
description: Distributed, offline-first bug tracker embedded in git, with bridges
license: GPL-3.0-or-later
formats:
- deb
- rpm
- apk
- archlinux
bindir: /usr/bin
contents:
# unlike the archives, a package can put these where the system will
# actually find them
- src: doc/man/*.1
dst: /usr/share/man/man1
- src: misc/completion/bash/git-bug
dst: /usr/share/bash-completion/completions/git-bug
- src: misc/completion/zsh/git-bug
dst: /usr/share/zsh/site-functions/_git-bug
- src: misc/completion/fish/git-bug
dst: /usr/share/fish/vendor_completions.d/git-bug.fish
sboms:
- id: archive
artifacts: archive
# Keyless signing: in CI, cosign gets its identity from the GitHub OIDC token,
# so there is no key to manage. Signing the checksum file covers every artifact
# listed in it with a single signature. The signature and the certificate both
# go in one sigstore bundle, which is the only output format cosign v3 writes.
signs:
- cmd: cosign
artifacts: checksum
output: true
signature: "${artifact}.sigstore.json"
args:
- sign-blob
- "--bundle=${signature}"
- "${artifact}"
- "--yes"
checksum:
name_template: checksums.txt
snapshot:
version_template: "{{ incpatch .Version }}-next"
changelog:
use: github-native
release:
draft: true
prerelease: auto