-
Notifications
You must be signed in to change notification settings - Fork 11
/
.goreleaser.yml
94 lines (94 loc) · 3.08 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
version: 2
project_name: khelm
dist: ./build/dist
before:
hooks:
- go mod tidy
builds:
- main: ./cmd/khelm
targets:
- linux_amd64
- linux_arm64
- darwin_amd64
- darwin_arm64
env:
- CGO_ENABLED=0
ldflags:
- -s -w -extldflags '-static' -X main.khelmVersion={{.Version}} -X main.helmVersion={{.Env.HELM_VERSION}}
archives:
- format: binary
name_template: "{{.ProjectName}}-{{.Os}}-{{.Arch}}"
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: '{{ incpatch .Version }}-dev-{{.ShortCommit}}'
changelog:
sort: asc
filters:
exclude:
- '^docs(\([^)]+\))?:'
- '^test(\([^)]+\))?:'
- '^chore(\([^)]+\))?:'
dockers:
- id: khelm-amd64-image
image_templates:
- docker.io/mgoltzsche/khelm:{{.Version}}-amd64
- ghcr.io/mgoltzsche/khelm:{{.Version}}-amd64
use: buildx
dockerfile: Dockerfile
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}}"
- "--build-arg=KHELM_VERSION={{.Version}}"
- "--build-arg=HELM_VERSION={{.Env.HELM_VERSION}}"
- "--platform=linux/amd64"
- id: khelm-arm64-image
image_templates:
- docker.io/mgoltzsche/khelm:{{.Version}}-arm64v8
- ghcr.io/mgoltzsche/khelm:{{.Version}}-arm64v8
use: buildx
goarch: arm64
dockerfile: Dockerfile
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}}"
- "--build-arg=KHELM_VERSION={{.Version}}"
- "--build-arg=HELM_VERSION={{.Env.HELM_VERSION}}"
- "--platform=linux/arm64/v8"
docker_manifests:
- id: khelm-multiarch-latest-dockerhub-image
name_template: docker.io/mgoltzsche/khelm:latest
image_templates:
- docker.io/mgoltzsche/khelm:{{.Version}}-amd64
- docker.io/mgoltzsche/khelm:{{.Version}}-arm64v8
- id: khelm-multiarch-latest-ghcr-image
name_template: ghcr.io/mgoltzsche/khelm:latest
image_templates:
- ghcr.io/mgoltzsche/khelm:{{.Version}}-amd64
- ghcr.io/mgoltzsche/khelm:{{.Version}}-arm64v8
- id: khelm-multiarch-major-dockerhub-image
name_template: docker.io/mgoltzsche/khelm:{{.Major}}
image_templates:
- docker.io/mgoltzsche/khelm:{{.Version}}-amd64
- docker.io/mgoltzsche/khelm:{{.Version}}-arm64v8
- id: khelm-multiarch-major-ghcr-image
name_template: ghcr.io/mgoltzsche/khelm:{{.Major}}
image_templates:
- ghcr.io/mgoltzsche/khelm:{{.Version}}-amd64
- ghcr.io/mgoltzsche/khelm:{{.Version}}-arm64v8
- id: khelm-multiarch-dockerhub-image
name_template: docker.io/mgoltzsche/khelm:{{.Version}}
image_templates:
- docker.io/mgoltzsche/khelm:{{.Version}}-amd64
- docker.io/mgoltzsche/khelm:{{.Version}}-arm64v8
- id: khelm-multiarch-ghcr-image
name_template: ghcr.io/mgoltzsche/khelm:{{.Version}}
image_templates:
- ghcr.io/mgoltzsche/khelm:{{.Version}}-amd64
- ghcr.io/mgoltzsche/khelm:{{.Version}}-arm64v8