-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
65 lines (59 loc) · 2.15 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
project_name: codegen
version: 2
env:
- GO111MODULE=on
- CGO_ENABLED=0
gomod:
proxy: true
mod: mod
builds:
- id: cli
binary: "{{ .ProjectName }}"
tags:
- release
ldflags:
- -s -w
- --extldflags "-static -fpic"
- -X github.com/lazygophers/utils/app.Name={{ .ProjectName }}
- -X github.com/lazygophers/utils/app.Commit={{ .FullCommit }}
- -X github.com/lazygophers/utils/app.ShortCommit={{ .ShortCommit }}
- -X github.com/lazygophers/utils/app.Branch={{ .Branch }}
- -X github.com/lazygophers/utils/app.Version={{ .Version }}
- -X github.com/lazygophers/utils/app.Tag={{ .Tag }}
- -X github.com/lazygophers/utils/app.BuildDate={{ .Date }}
- -X github.com/lazygophers/utils/app.GoVersion={{ .Env.GOVERSION }}
- -X github.com/lazygophers/utils/app.GoOS={{ .Os }}
- -X github.com/lazygophers/utils/app.Goarch={{ .Arch }}
- -X github.com/lazygophers/utils/app.Goarm={{ .Arm }}
- -X github.com/lazygophers/utils/app.Goamd64={{ .Amd64 }}
- -X github.com/lazygophers/utils/app.Gomips={{ .Mips }}
gcflags:
- -N -l
main: ./cmd/
targets:
- linux_amd64_v3
- linux_arm64
- windows_amd64_v3
- darwin_amd64_v3
- darwin_arm64
archives:
- format: tar.gz
name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
format_overrides:
- goos: windows
format: zip
files:
- LICENSE
- README.md
- example.codegen.cfg.yaml
checksum:
algorithm: sha512
name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}.sha512'
source:
enabled: false
files:
- LICENSE
- README.md
- conf.example.yaml
- '*.go'
report_sizes: true