-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
115 lines (110 loc) · 4.36 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
before:
hooks:
- go mod download
builds:
- id: machine-name
main: ./cmd/machinename
binary: machine-name
env:
- CGO_ENABLED=0
targets:
- linux_amd64_v1
- linux_arm64
- linux_arm_7
- darwin_amd64_v1
- darwin_arm64
- windows_amd64_v1
archives:
- id: machine-name
builds: ["machine-name"]
name_template: "machine-name_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
format_overrides:
- goos: windows
format: zip
release:
github:
prerelease: auto
dockers:
# machine-name
- id: machine-name-amd64
ids:
- machine-name
dockerfile: "Dockerfile"
use: buildx
image_templates:
- "ghcr.io/planktoscope/machine-name:latest-amd64"
- "ghcr.io/planktoscope/machine-name:{{ .Major }}-amd64"
- "ghcr.io/planktoscope/machine-name:{{ .Major }}.{{ .Minor }}-amd64"
- "ghcr.io/planktoscope/machine-name:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--label=org.opencontainers.image.licenses=(Apache-2.0 OR BlueOak-1.0.0)"
- id: machine-name-arm64v8
ids:
- machine-name
dockerfile: "Dockerfile"
use: buildx
goarch: arm64
image_templates:
- "ghcr.io/planktoscope/machine-name:latest-arm64v8"
- "ghcr.io/planktoscope/machine-name:{{ .Major }}-arm64v8"
- "ghcr.io/planktoscope/machine-name:{{ .Major }}.{{ .Minor }}-arm64v8"
- "ghcr.io/planktoscope/machine-name:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64v8"
build_flag_templates:
- "--pull"
- "--platform=linux/arm64/v8"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--label=org.opencontainers.image.licenses=(Apache-2.0 OR BlueOak-1.0.0)"
- id: machine-name-armv7
ids:
- machine-name
dockerfile: "Dockerfile"
use: buildx
goarch: arm
goarm: 7
image_templates:
- "ghcr.io/planktoscope/machine-name:latest-armv7"
- "ghcr.io/planktoscope/machine-name:{{ .Major }}-armv7"
- "ghcr.io/planktoscope/machine-name:{{ .Major }}.{{ .Minor }}-armv7"
- "ghcr.io/planktoscope/machine-name:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-armv7"
build_flag_templates:
- "--pull"
- "--platform=linux/arm/v7"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--label=org.opencontainers.image.licenses=(Apache-2.0 OR BlueOak-1.0.0)"
docker_manifests:
# machine-name
- name_template: "ghcr.io/planktoscope/machine-name:latest"
image_templates:
- "ghcr.io/planktoscope/machine-name:latest-amd64"
- "ghcr.io/planktoscope/machine-name:latest-arm64v8"
- "ghcr.io/planktoscope/machine-name:latest-armv7"
- name_template: "ghcr.io/planktoscope/machine-name:{{ .Major }}"
image_templates:
- "ghcr.io/planktoscope/machine-name:{{ .Major }}-amd64"
- "ghcr.io/planktoscope/machine-name:{{ .Major }}-arm64v8"
- "ghcr.io/planktoscope/machine-name:{{ .Major }}-armv7"
- name_template: "ghcr.io/planktoscope/machine-name:{{ .Major }}.{{ .Minor }}"
image_templates:
- "ghcr.io/planktoscope/machine-name:{{ .Major }}.{{ .Minor }}-amd64"
- "ghcr.io/planktoscope/machine-name:{{ .Major }}.{{ .Minor }}-arm64v8"
- "ghcr.io/planktoscope/machine-name:{{ .Major }}.{{ .Minor }}-armv7"
- name_template: "ghcr.io/planktoscope/machine-name:{{ .Major }}.{{ .Minor }}.{{ .Patch }}"
image_templates:
- "ghcr.io/planktoscope/machine-name:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
- "ghcr.io/planktoscope/machine-name:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64v8"
- "ghcr.io/planktoscope/machine-name:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-armv7"