-
Notifications
You must be signed in to change notification settings - Fork 3
/
.goreleaser.yaml
103 lines (94 loc) · 3.43 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
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
project_name: k6x
version: 2
env:
- IMAGE_OWNER=ghcr.io/grafana
before:
hooks:
- go mod tidy
dist: build/dist
builds:
- env:
- CGO_ENABLED=0
goos: ["darwin", "linux", "windows"]
goarch: ["amd64", "arm64"]
ldflags:
- "-s -w -X main.version={{.Version}} -X main.appname={{.ProjectName}}"
source:
enabled: true
name_template: "{{ .ProjectName }}_{{ .Version }}_source"
archives:
- id: bundle
format: tar.gz
format_overrides:
- goos: windows
format: zip
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
snapshot:
name_template: "{{ incpatch .Version }}-next+{{.ShortCommit}}{{if .IsGitDirty}}.dirty{{else}}{{end}}"
changelog:
sort: asc
abbrev: -1
filters:
exclude:
- "^chore:"
- "^docs:"
- "^test:"
git:
ignore_tags:
- "nightly"
- "before-grafana"
dockers:
- id: amd64
dockerfile: Dockerfile.goreleaser
use: buildx
image_templates:
- "{{ .Env.IMAGE_OWNER }}/{{ .ProjectName }}:{{ .Tag }}-amd64"
- "{{ .Env.IMAGE_OWNER }}/{{ .ProjectName }}:v{{ .Major }}-amd64"
- "{{ .Env.IMAGE_OWNER }}/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}-amd64"
- "{{ .Env.IMAGE_OWNER }}/{{ .ProjectName }}:latest-amd64"
build_flag_templates:
- "--platform=linux/amd64"
- "--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.licenses=AGPL-3.0-only"
- id: arm64
dockerfile: Dockerfile.goreleaser
use: buildx
image_templates:
- "{{ .Env.IMAGE_OWNER }}/{{ .ProjectName }}:{{ .Tag }}-arm64"
- "{{ .Env.IMAGE_OWNER }}/{{ .ProjectName }}:v{{ .Major }}-arm64"
- "{{ .Env.IMAGE_OWNER }}/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}-arm64"
- "{{ .Env.IMAGE_OWNER }}/{{ .ProjectName }}:latest-arm64"
build_flag_templates:
- "--platform=linux/arm64"
- "--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.licenses=AGPL-3.0-only"
docker_manifests:
- id: tag
name_template: "{{ .Env.IMAGE_OWNER }}/{{ .ProjectName }}:{{ .Tag }}"
image_templates:
- "{{ .Env.IMAGE_OWNER }}/{{ .ProjectName }}:{{ .Tag }}-amd64"
- "{{ .Env.IMAGE_OWNER }}/{{ .ProjectName }}:{{ .Tag }}-arm64"
- id: major
name_template: "{{ .Env.IMAGE_OWNER }}/{{ .ProjectName }}:v{{ .Major }}"
image_templates:
- "{{ .Env.IMAGE_OWNER }}/{{ .ProjectName }}:v{{ .Major }}-amd64"
- "{{ .Env.IMAGE_OWNER }}/{{ .ProjectName }}:v{{ .Major }}-arm64"
- id: major-minor
name_template: "{{ .Env.IMAGE_OWNER }}/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}"
image_templates:
- "{{ .Env.IMAGE_OWNER }}/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}-amd64"
- "{{ .Env.IMAGE_OWNER }}/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}-arm64"
- id: latest
name_template: "{{ .Env.IMAGE_OWNER }}/{{ .ProjectName }}:latest"
image_templates:
- "{{ .Env.IMAGE_OWNER }}/{{ .ProjectName }}:latest-amd64"
- "{{ .Env.IMAGE_OWNER }}/{{ .ProjectName }}:latest-arm64"