Skip to content

Commit eaf6eb3

Browse files
committed
add: goreleaser
1 parent 4d6becd commit eaf6eb3

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
dist/

.goreleaser.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
before:
5+
hooks:
6+
# You may remove this if you don't use go modules.
7+
- go mod tidy
8+
# you may remove this if you don't need go generate
9+
- go generate ./...
10+
11+
builds:
12+
- env:
13+
- CGO_ENABLED=0
14+
goos:
15+
- linux
16+
- windows
17+
- darwin
18+
19+
archives:
20+
- format: tar.gz
21+
# this name template makes the OS and Arch compatible with the results of `uname`.
22+
name_template: >-
23+
{{ .ProjectName }}_
24+
{{- title .Os }}_
25+
{{- if eq .Arch "amd64" }}x86_64
26+
{{- else if eq .Arch "386" }}i386
27+
{{- else }}{{ .Arch }}{{ end }}
28+
{{- if .Arm }}v{{ .Arm }}{{ end }}
29+
# use zip for windows archives
30+
format_overrides:
31+
- goos: windows
32+
format: zip
33+
34+
changelog:
35+
sort: asc
36+
filters:
37+
exclude:
38+
- "^docs:"
39+
- "^test:"

0 commit comments

Comments
 (0)