Skip to content

Commit 44d1991

Browse files
committed
Add Goreleaser configuration for building and packaging the application
1 parent 9eb4844 commit 44d1991

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.goreleaser.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
5+
builds:
6+
- env:
7+
- CGO_ENABLED=0
8+
goos:
9+
- linux
10+
- windows
11+
- darwin
12+
goarch:
13+
- amd64
14+
- arm64
15+
- arm
16+
- "386"
17+
goarm:
18+
- "7"
19+
ignore:
20+
- goos: darwin
21+
goarch: arm
22+
- goos: windows
23+
goarch: arm
24+
- goos: darwin
25+
goarch: "386"
26+
mod_timestamp: '{{ .CommitTimestamp }}'
27+
flags:
28+
- -trimpath
29+
ldflags:
30+
- -s -w -X main.CurrentCommit={{ .ShortCommit }}
31+
32+
archives:
33+
- format: tar.gz
34+
name_template: >-
35+
{{ .ProjectName }}_
36+
{{- title .Os }}_
37+
{{- if eq .Arch "amd64" }}x86_64
38+
{{- else if eq .Arch "386" }}i386
39+
{{- else if eq .Arch "arm64" }}aarch64
40+
{{- else if eq .Arch "arm" }}armv7
41+
{{- else }}{{ .Arch }}{{ end }}
42+
format_overrides:
43+
- goos: windows
44+
format: zip
45+
46+
changelog:
47+
sort: asc
48+
filters:
49+
exclude:
50+
- '^docs:'
51+
- '^test:'
52+
- '^chore:'
53+
- Merge pull request
54+
- Merge branch

0 commit comments

Comments
 (0)