-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yml
60 lines (55 loc) · 1.46 KB
/
.goreleaser.yml
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
# To test / verify
# macOS / Linux:
# $ docker run -ti -v "$PWD:$PWD" -w "$PWD" goreleaser/goreleaser:latest release --snapshot --clean
# windows (Git bash):
# $ MSYS_NO_PATHCONV=1 docker run -ti -v "$PWD:$PWD" -w "$PWD" goreleaser/goreleaser:latest release --snapshot --clean
project_name: smash
before:
hooks:
- go mod download
release:
name_template: "{{.ProjectName}}-v{{.Version}}"
draft: false
prerelease: auto
make_latest: true
snapshot:
name_template: '{{ incpatch .Version }}-{{.ShortCommit}}'
builds:
- env:
- CGO_ENABLED=0
goarch:
- amd64
- arm64
goamd64:
# https://github.com/golang/go/wiki/MinimumRequirements#amd64
- v1
goos:
- darwin
- freebsd
- linux
- windows
flags:
- -trimpath
ldflags:
- -s -w
- -X "github.com/thushan/smash/internal/smash.Version=v{{.Version}}"
- -X "github.com/thushan/smash/internal/smash.Commit={{.Commit}}"
- -X "github.com/thushan/smash/internal/smash.Date={{.CommitDate}}"
- -X "github.com/thushan/smash/internal/smash.User=goreleaser"
checksum:
name_template: "checksums.txt"
archives:
- files:
- LICENSE
format_overrides:
- goos: windows
format: zip
- goos: darwin
format: zip
name_template: >-
{{ .ProjectName }}_v{{- .Version }}_{{- if eq .Os "darwin" }}macos_{{- else }}{{ .Os }}_{{ end }}{{- .Arch }}
changelog:
sort: asc
filters:
exclude:
- "^Merge"