-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.goreleaser.yml
143 lines (130 loc) · 4.07 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
version: 2 # goreleaser config format
project_name: ghcommit
builds:
- binary: ghcommit
main: ./
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
# Default is `-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}`.
-s -w -X main.version={{.Version}}+{{.ShortCommit}}
goos:
- linux
- darwin
- freebsd
- openbsd
goarch:
- amd64
- arm64
goarm:
- ""
ignore:
- goos: darwin
goarch: 386
- goos: windows
goarch: 386
archives:
# binary-only releases - all platforms
- id: binaries
formats:
- binary
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
# archive releases containing: binary, readme, and license. tarballs (macos, linux), zip (windows)
- id: archives
name_template: >-
{{ .ProjectName }}_
{{- .Os }}_
{{- if eq .Arch "amd64" }}amd64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
format_overrides:
- goos: windows
formats:
- zip
checksum:
name_template: "checksums.txt"
snapshot:
version_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^ci:"
- "^test:"
- "skip ci"
- "ci skip"
- Merge pull request
- Merge branch
release:
github:
owner: planetscale
name: ghcommit
footer: |
## Docker Images
amd64:
- `ghcr.io/planetscale/ghcommit:{{ .Tag }}`
- `ghcr.io/planetscale/ghcommit:v{{ .Major }}`
- `ghcr.io/planetscale/ghcommit:v{{ .Major }}.{{ .Minor }}`
- `ghcr.io/planetscale/ghcommit:v{{ .Major }}.{{ .Minor }}.{{ .Patch }}`
- `ghcr.io/planetscale/ghcommit:latest`
arm64:
- `ghcr.io/planetscale/ghcommit:{{ .Tag }}-arm64`
- `ghcr.io/planetscale/ghcommit:v{{ .Major }}-arm64`
- `ghcr.io/planetscale/ghcommit:v{{ .Major }}.{{ .Minor }}-arm64`
- `ghcr.io/planetscale/ghcommit:v{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64`
- `ghcr.io/planetscale/ghcommit:latest-arm64`
dockers:
# primary docker image for amd64 arch
- dockerfile: Dockerfile
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
ids:
- ghcommit
goos: linux
goarch: amd64
image_templates:
- "ghcr.io/planetscale/ghcommit:{{ .Tag }}-amd64"
- "ghcr.io/planetscale/ghcommit:v{{ .Major }}-amd64"
- "ghcr.io/planetscale/ghcommit:v{{ .Major }}.{{ .Minor }}-amd64"
- "ghcr.io/planetscale/ghcommit:v{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
- "ghcr.io/planetscale/ghcommit:latest-amd64"
# build a docker image for arm64 arch
- dockerfile: Dockerfile
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/arm64"
ids:
- ghcommit
goos: linux
goarch: arm64
goarm: ""
image_templates:
- "ghcr.io/planetscale/ghcommit:{{ .Tag }}-arm64"
- "ghcr.io/planetscale/ghcommit:v{{ .Major }}-arm64"
- "ghcr.io/planetscale/ghcommit:v{{ .Major }}.{{ .Minor }}-arm64"
- "ghcr.io/planetscale/ghcommit:v{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64"
- "ghcr.io/planetscale/ghcommit:latest-arm64"
# use `docker_manifests` section to create combined multi-arch image manifests:
docker_manifests:
- name_template: "ghcr.io/planetscale/ghcommit:{{ .Tag }}"
image_templates:
- "ghcr.io/planetscale/ghcommit:{{ .Tag }}-amd64"
- "ghcr.io/planetscale/ghcommit:{{ .Tag }}-arm64"
- name_template: "ghcr.io/planetscale/ghcommit:v{{ .Major }}"
image_templates:
- "ghcr.io/planetscale/ghcommit:v{{ .Major }}-amd64"
- "ghcr.io/planetscale/ghcommit:v{{ .Major }}-arm64"
- name_template: "ghcr.io/planetscale/ghcommit:v{{ .Major }}.{{ .Minor }}"
image_templates:
- "ghcr.io/planetscale/ghcommit:v{{ .Major }}.{{ .Minor }}-amd64"
- "ghcr.io/planetscale/ghcommit:v{{ .Major }}.{{ .Minor }}-arm64"
- name_template: "ghcr.io/planetscale/ghcommit:latest"
image_templates:
- "ghcr.io/planetscale/ghcommit:latest-amd64"
- "ghcr.io/planetscale/ghcommit:latest-arm64"