-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
110 lines (98 loc) · 3.13 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
env:
- GO111MODULE=on
- GOPROXY=https://goproxy.io,direct
before:
hooks:
- go mod download
builds:
- env:
- CGO_ENABLED=0
goos:
- darwin
- linux
- windows
goarch:
- 386
- amd64
- arm
- arm64
ignore:
- goos: darwin
goarch: 386
ldflags:
- -w -X github.com/zackijack/{{ .ProjectName }}/internal/version.Version={{ .Version }} -X github.com/zackijack/{{ .ProjectName }}/internal/version.GitCommit={{ .FullCommit }} -X github.com/zackijack/{{ .ProjectName }}/internal/version.BuildDate={{ .Date }}
archives:
- name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
format_overrides:
- goos: windows
format: zip
checksum:
name_template: "{{ .ProjectName }}_checksums.txt"
snapshot:
name_template: "{{ .Tag }}-{{.ShortCommit}}"
changelog:
sort: asc
filters:
exclude:
- "^docs"
- "^chore"
- "^style"
- "^refactor"
- "^test"
- Merge pull request
- Merge branch
- go mod tidy
brews:
- tap:
owner: zackijack
name: homebrew-tap
folder: Formula
homepage: https://github.com/zackijack/{{ .ProjectName }}
description: Go project template
install: |
bin.install "{{ .ProjectName }}"
output = Utils.safe_popen_read({ "SHELL" => "bash" }, bin/"{{ .ProjectName }}", "completion", "bash")
(bash_completion/"{{ .ProjectName }}").write output
output = Utils.safe_popen_read({ "SHELL" => "zsh" }, bin/"{{ .ProjectName }}", "completion", "zsh")
(zsh_completion/"_{{ .ProjectName }}").write output
test: |
system "#{bin}/{{ .ProjectName }} version"
scoop:
bucket:
owner: zackijack
name: scoop-bucket
homepage: https://github.com/zackijack/{{ .ProjectName }}
description: Go project template
nfpms:
- file_name_template: "{{ .ProjectName }}_{{ .Arch }}"
homepage: https://github.com/zackijack/{{ .ProjectName }}
description: Go project template
formats:
- deb
- rpm
dockers:
- image_templates:
- "zackijack/{{ .ProjectName }}:{{ .Tag }}"
- "zackijack/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}"
- "zackijack/{{ .ProjectName }}:v{{ .Major }}"
- "zackijack/{{ .ProjectName }}:latest"
dockerfile: Dockerfile
use_buildx: true
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.description={{ .ProjectName }}"
- "--label=org.opencontainers.image.url=https://github.com/zackijack/{{ .ProjectName }}"
- "--label=org.opencontainers.image.source=https://github.com/zackijack/{{ .ProjectName }}"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--cache-from=type=local,src=/tmp/.buildx-cache"
- "--cache-to=type=local,dest=/tmp/.buildx-cache"