Repository navigation
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
218 lines (200 loc) · 5.6 KB
/
Copy path.goreleaser.yaml
File metadata and controls
218 lines (200 loc) · 5.6 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
version: 2
project_name: fga
before:
hooks:
- go mod tidy
- ./scripts/completions.sh
- ./scripts/manpages.sh
builds:
-
main: ./cmd/fga/main.go
binary: fga
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
ldflags:
- "-s -w"
- "-X github.com/openfga/cli/internal/build.Version={{ .Version }}"
- "-X github.com/openfga/cli/internal/build.Commit={{.Commit}}"
- "-X github.com/openfga/cli/internal/build.Date={{.Date}}"
dockers_v2:
- images:
- openfga/cli
tags:
- latest
- "{{ .Tag }}"
- "v{{ .Major }}"
- "v{{ .Major }}.{{ .Minor }}"
dockerfile: .goreleaser.Dockerfile
platforms:
- linux/amd64
- linux/arm64
labels:
org.opencontainers.image.created: "{{ .Date }}"
org.opencontainers.image.title: "{{ .ProjectName }}"
org.opencontainers.image.revision: "{{ .FullCommit }}"
org.opencontainers.image.version: "{{ .Version }}"
flags:
- "--pull"
release:
draft: true
use_existing_draft: true
mode: keep-existing
github:
owner: openfga
name: cli
sboms:
- artifacts: archive
signs:
- cmd: cosign
env:
- COSIGN_EXPERIMENTAL=1
certificate: '${artifact}.pem'
args:
- sign-blob
- '--output-certificate=${certificate}'
- '--output-signature=${signature}'
- '${artifact}'
- "--yes" # needed on cosign 2.0.0+
artifacts: checksum
output: true
docker_signs:
- cmd: cosign
env:
- COSIGN_EXPERIMENTAL=1
artifacts: images
output: true
args:
- 'sign'
- '${artifact}@${digest}'
- "--yes" # needed on cosign 2.0.0+
brews:
- name: "{{.ProjectName}}"
repository:
owner: openfga
name: homebrew-tap
homepage: "https://openfga.dev/"
description: "A cross-platform CLI to interact with an OpenFGA server."
license: "Apache-2.0"
directory: "Formula"
url_template: "https://github.com/openfga/cli/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
download_strategy: CurlDownloadStrategy
# update the head formula on each release
custom_block: |
head "https://github.com/openfga/cli.git", :branch => "main"
dependencies:
- name: go
type: optional
- name: git
install: |
bin.install "fga"
bash_completion.install "completions/fga.bash" => "fga"
zsh_completion.install "completions/fga.zsh" => "_fga"
fish_completion.install "completions/fga.fish"
man1.install "manpages/fga.1.gz"
test: |
system "#{bin}/fga version"
- name: "{{.ProjectName}}@{{.Version}}"
repository:
owner: openfga
name: homebrew-tap
homepage: "https://openfga.dev/"
description: "A cross-platform CLI to interact with an OpenFGA server."
license: "Apache-2.0"
directory: "Formula"
url_template: "https://github.com/openfga/cli/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
download_strategy: CurlDownloadStrategy
# update the head formula on each release
custom_block: |
head "https://github.com/openfga/cli.git", :branch => "main"
dependencies:
- name: go
type: optional
- name: git
install: |
bin.install "fga"
bash_completion.install "completions/fga.bash" => "fga"
zsh_completion.install "completions/fga.zsh" => "_fga"
fish_completion.install "completions/fga.fish"
man1.install "manpages/fga.1.gz"
test: |
system "#{bin}/fga version"
aurs:
- package: |-
# bin
install -Dm755 "./fga" "${pkgdir}/usr/bin/fga"
# license
install -Dm644 "./LICENSE.md" "${pkgdir}/usr/share/licenses/fga/LICENSE"
# completions
mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
install -Dm644 "./completions/fga.bash" "${pkgdir}/usr/share/bash-completion/completions/fga"
install -Dm644 "./completions/fga.zsh" "${pkgdir}/usr/share/zsh/site-functions/_fga"
install -Dm644 "./completions/fga.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/fga.fish"
# manpages
install -Dm644 "./manpages/fga.1.gz" "${pkgdir}/usr/share/man/man1/fga.1.gz"
nfpms:
- package_name: fga
vendor: OpenFGA
homepage: https://openfga.dev/
maintainer: 'OpenFGA <contact@openfga.dev>'
description: |-
A cross-platform CLI to interact with an OpenFGA server.
license: Apache 2.0
formats:
- apk
- deb
- rpm
- termux.deb
- archlinux
provides:
- fga
suggests:
- jq
bindir: /usr/bin
contents:
- src: ./completions/fga.bash
dst: /usr/share/bash-completion/completions/fga
file_info:
mode: 0644
- src: ./completions/fga.fish
dst: /usr/share/fish/vendor_completions.d/fga.fish
file_info:
mode: 0644
- src: ./completions/fga.zsh
dst: /usr/share/zsh/vendor-completions/_fga
file_info:
mode: 0644
- src: ./manpages/fga.1.gz
dst: /usr/share/man/man1/fga.1.gz
file_info:
mode: 0644
archives:
- files:
- README.md
- LICENSE
- CHANGELOG.md
- completions/*
- manpages/*
checksum:
name_template: 'checksums.txt'
extra_files:
- glob: README.md
- glob: LICENSE
- glob: CHANGELOG.md
- glob: completions/*
- glob: manpages/*
snapshot:
name_template: "{{ incpatch .Version }}-next"
report_sizes: true
changelog:
sort: asc
filters:
exclude:
- '^chore' # chore commits
- '^release' # release commits
- '(#\d*)$' # merge commits