-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.goreleaser.yml
72 lines (68 loc) · 2.09 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
project_name: gophlare
version: 2
env:
- GO111MODULE=on
- GITHUB_TOKEN={{ .Env.GITHUB_TOKEN }}
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
builds:
- env: [CGO_ENABLED=0]
id: gophlare
binary: gophlare
flags:
- -trimpath
asmflags:
- all=-trimpath={{.Env.GOPATH}}
gcflags:
- all=-trimpath={{.Env.GOPATH}}
ldflags: |
-s -w
goos:
- linux
- darwin
goarch:
- amd64
- arm64
archives:
- id: tgz
checksum:
name_template: 'checksums.txt'
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
dockers:
- image_templates:
- "ghcr.io/mr-pmillz/{{ .ProjectName }}:latest-amd64"
- "ghcr.io/mr-pmillz/{{ .ProjectName }}:{{ .Tag }}-amd64"
goarch: amd64
dockerfile: goreleaser.dockerfile
use: buildx
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.url=https://github.com/mr-pmillz/{{.ProjectName}}"
- "--label=org.opencontainers.image.source=https://github.com/mr-pmillz/{{.ProjectName}}"
- "--platform=linux/amd64"
- image_templates:
- "ghcr.io/mr-pmillz/{{ .ProjectName }}:latest-arm64"
- "ghcr.io/mr-pmillz/{{ .ProjectName }}:{{ .Tag }}-arm64"
goarch: arm64
dockerfile: goreleaser.dockerfile
use: buildx
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.url=https://github.com/mr-pmillz/{{.ProjectName}}"
- "--label=org.opencontainers.image.source=https://github.com/mr-pmillz/{{.ProjectName}}"
- "--platform=linux/arm64"