-
Notifications
You must be signed in to change notification settings - Fork 1
/
.goreleaser.yaml
349 lines (312 loc) · 11 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
# The project name is used in the name of the Brew formula, archives, etc.
# If none is given, it will be inferred from the name of the GitHub, GitLab, or Gitea release.
project_name: guance
before:
hooks:
- go mod tidy
env:
- GO111MODULE=on
- CGO_ENABLED=0
builds:
# You can have multiple builds defined as a yaml list
# - main: ./cmd/cli
# id: "cli"
# binary: cli
# - main: ./cmd/worker
# id: "worker"
# binary: worker
# Path to main.go file or main package.
# Notice: when used with `gomod.proxy`, this must be a package.
# Default is `.`.
- main: ./cmd/guance
# Binary name.
# Can be a path (e.g. `bin/app`) to wrap the binary in a directory.
# Default is the name of the project directory.
binary: guance
# GOOS list to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
# Defaults are darwin and linux.
goos:
- linux
- windows
- darwin
# GOARCH to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
# Defaults are 386, amd64 and arm64.
goarch:
- amd64
- arm64
# # GOARM to build for when GOARCH is arm.
# # For more info refer to: https://golang.org/doc/install/source#environment
# # Default is only 6.
# goarm:
# - 6
# - 7
# # GOAMD64 to build when GOARCH is amd64.
# # For more info refer to: https://golang.org/doc/install/source#environment
# # Default is only v1.
# goamd64:
# - v2
# - v3
dockers:
- image_templates:
- "guancecloud/guance:{{ .Version }}-amd64"
goos: linux
goarch: amd64
dockerfile: Dockerfile
use: docker
build_flag_templates:
- --platform=linux/amd64
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://guance.io
- --label=org.opencontainers.image.source=https://github.com/GuanceCloud/guance-cli
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=MIT
- image_templates:
- "guancecloud/guance:{{ .Version }}-arm64v8"
goos: linux
goarch: arm64
dockerfile: Dockerfile
use: docker
build_flag_templates:
- --platform=linux/arm64/v8
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://guance.io
- --label=org.opencontainers.image.source=https://github.com/GuanceCloud/guance-cli
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=MIT
docker_manifests:
# You can have multiple Docker manifests.
- name_template: guancecloud/{{ .ProjectName }}:{{ .Version }}
image_templates:
- guancecloud/guance:{{ .Version }}-amd64
- guancecloud/guance:{{ .Version }}-arm64v8
- name_template: guancecloud/{{ .ProjectName }}:latest
image_templates:
- guancecloud/guance:{{ .Version }}-amd64
- guancecloud/guance:{{ .Version }}-arm64v8
# GoReleaser can be wired to nfpm to generate and publish .deb, .rpm and .apk packages.
nfpms:
- id: guance
maintainer: Guance Cloud <[email protected]>
vendor: Guance Cloud Inc.
description: Command-Line Toolkit for Guance Cloud
homepage: https://guance.io
license: MIT
formats:
- deb
- rpm
- apk
- archlinux
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
publishers:
- name: fury.io
# by specifying `packages` id here goreleaser will only use this publisher
# with artifacts identified by this id
ids:
- guance
dir: "{{ dir .ArtifactPath }}"
cmd: curl -F package=@{{ .ArtifactName }} https://{{ .Env.FURY_TOKEN }}@push.fury.io/guancecloud/
# your github_token in this file
# or
# setup ENV GitHub token: $ export GITHUB_TOKEN="YOUR_GH_TOKEN"
# github_token: ~/go/src/github.com/github_token
env_files: {}
changelog:
# Set this to true if you don't want any changelog at all.
# Warning: this will also ignore any changelog files passed via `--release-notes`,
# and will render an empty changelog.
# This may result in an empty release notes on GitHub/GitLab/Gitea.
skip: false
# Changelog generation implementation to use.
#
# Valid options are:
# - `git`: uses `git log`;
# - `github`: uses the compare GitHub API, appending the author login to the changelog.
# - `gitlab`: uses the compare GitLab API, appending the author name and email to the changelog.
# - `github-native`: uses the GitHub release notes generation API, disables the groups feature.
#
# Defaults to `git`.
use: github-native
# Sorts the changelog by the commit's messages.
# Could either be asc, desc or empty
# Default is empty
sort: asc
# 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.
#
# Default: 0.
abbrev: 0
# Group commits messages by given regex and title.
# Order value defines the order of the groups.
# Proving no regex means all commits will be grouped under the default group.
# Groups are disabled when using github-native, as it already groups things by itself.
#
# Default is no groups.
filters:
# Commit messages matching the regexp listed here will be removed from
# the changelog
# Default is empty
exclude:
- '^docs:'
- typo
brews:
-
# Name template of the recipe
# Default to project name
name: guance
# NOTE: make sure the url_template, the token and given repo (github or
# gitlab) owner and name are from the same kind.
# We will probably unify this in the next major version like it is
# done with scoop.
# GitHub/GitLab repository to push the formula to
tap:
# Repository owner template. (templateable)
owner: GuanceCloud
# Repository name. (templateable)
name: homebrew-tap
# Optionally a branch can be provided. (templateable)
#
# Defaults to the default repository branch.
branch: main
# Optionally a token can be provided, if it differs from the token
# provided to GoReleaser
token: "{{ .Env.GITHUB_TOKEN }}"
# Template for the url which is determined by the given Token (github,
# gitlab or gitea)
#
# Default depends on the client.
url_template: "https://github.com/GuanceCloud/guance-cli/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
# Allows you to set a custom download strategy. Note that you'll need
# to implement the strategy and add it to your tap repository.
# Example: https://docs.brew.sh/Formula-Cookbook#specifying-the-download-strategy-explicitly
# Default is empty.
download_strategy: CurlDownloadStrategy
# Git author used to commit to the repository.
# Defaults are shown.
commit_author:
name: guance-bot
email: [email protected]
# The project name and current git tag are used in the format string.
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
# Folder inside the repository to put the formula.
# Default is the root folder.
folder: Formula
# Your app's homepage.
# Default is empty.
homepage: "https://guance.io/"
# Template of your app's description.
# Default is empty.
description: "Software to create fast and easy drum rolls."
# SPDX identifier of your app's license.
# Default is empty.
license: "MIT"
# So you can `brew test` your formula.
# Default is empty.
test: |
system "#{bin}/guance version"
# ...
# Custom install script for brew.
# Default is 'bin.install "the binary name"'.
install: |
bin.install "guance"
# ...
#chocolateys:
# - # Your app's owner.
# # It basically means your.
# # Defaults empty.
# owners: Guance Cloud Inc
#
# # The app's title.
# # A human-friendly title of the package.
# # Defaults to `ProjectName`.
# title: guance Programming Language
#
# # Your app's authors (probably you).
# # Defaults are shown below.
# authors: Guance Cloud
#
# # Your app's project url.
# # It is a required field.
# project_url: https://guance.guance.io/
#
# # Template for the url which is determined by the given Token (github,
# # gitlab or gitea)
# # Default depends on the client.
# url_template: "https://github.com/GuanceCloud/guance/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
#
# # App's icon.
# # Default is empty.
# icon_url: 'https://guance.guance.io/images/icon.png'
#
# # Your app's copyright details.
# # Default is empty.
# copyright: 2022 Guance Cloud Inc
#
# # App's license information url.
# license_url: https://github.com/GuanceCloud/guance/blob/main/LICENSE
#
# # Your apps's require license acceptance:
# # Specify whether the client must prompt the consumer to accept the package
# # license before installing.
# # Default is false.
# require_license_acceptance: false
#
# # Your app's source url.
# # Default is empty.
# project_source_url: https://github.com/GuanceCloud/guance
#
# # Your app's documentation url.
# # Default is empty.
# docs_url: https://guance.guance.io/docs
#
# # App's bugtracker url.
# # Default is empty.
# bug_tracker_url: https://github.com/GuanceCloud/guance/issues
#
# # Your app's tag list.
# # Default is empty.
# tags: "language observability"
#
# # Your app's summary:
# summary: guance programming language for Observability Data Pipeline
#
# # This the description of your chocolatey package.
# # Supports markdown.
# description: |
# Build and run guance programs with the CLI.
#
# # Your app's release notes.
# # A description of the changes made in this release of the package.
# # Supports markdown. To prevent the need to continually update this field,
# # providing a URL to an external list of Release Notes is perfectly
# # acceptable.
# # Default is empty.
# release_notes: "https://github.com/GuanceCloud/guance/releases/tag/v{{ .Version }}"
#
# # App's dependencies
# # Default is empty. Version is not required.
# dependencies:
# - id: nfpm
#
# # The api key that should be used to push to the chocolatey repository.
# #
# # WARNING: do not expose your api key in the configuration file!
# api_key: '{{ .Env.CHOCOLATEY_API_KEY }}'
snapshot:
# Allows you to change the name of the generated snapshot
#
# Note that some pipes require this to be semantic version compliant (nfpm,
# for example).
#
# Default is `{{ .Version }}-SNAPSHOT-{{.ShortCommit}}`.
name_template: '{{ incpatch .Version }}-devel'