Skip to content

Commit 5c270d1

Browse files
committed
add goreleaser cofig
1 parent c6f0c2f commit 5c270d1

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.goreleaser.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This is an example .goreleaser.yml file with some sensible defaults.
2+
# Make sure to check the documentation at https://goreleaser.com
3+
4+
# The lines bellow are called `modelines`. See `:help modeline`
5+
# Feel free to remove those if you don't want/need to use them.
6+
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
7+
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
8+
9+
before:
10+
hooks:
11+
# You may remove this if you don't use go modules.
12+
- go mod tidy
13+
# you may remove this if you don't need go generate
14+
- go generate ./...
15+
16+
builds:
17+
- env:
18+
- CGO_ENABLED=0
19+
goos:
20+
- linux
21+
- windows
22+
- darwin
23+
- android
24+
25+
archives:
26+
- format: tar.gz
27+
# this name template makes the OS and Arch compatible with the results of `uname`.
28+
name_template: >-
29+
{{ .ProjectName }}_
30+
{{- title .Os }}_
31+
{{- if eq .Arch "amd64" }}x86_64
32+
{{- else if eq .Arch "386" }}i386
33+
{{- else }}{{ .Arch }}{{ end }}
34+
{{- if .Arm }}v{{ .Arm }}{{ end }}
35+
# use zip for windows archives
36+
format_overrides:
37+
- goos: windows
38+
format: zip
39+
40+
changelog:
41+
sort: asc
42+
filters:
43+
exclude:
44+
- "^docs:"
45+
- "^test:"

0 commit comments

Comments
 (0)