-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
137 lines (132 loc) · 5.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
before:
hooks:
- go mod download
builds:
- id: forklift
main: ./cmd/forklift
binary: forklift
ldflags:
- -s -w -X main.buildVersion={{.Version}} -X main.buildCommit={{.Commit}} -X main.buildCommitTimestamp={{.CommitTimestamp}} -X main.buildSummary={{.Summary}} -X main.builtBy=goreleaser
env:
- CGO_ENABLED=0
targets:
- linux_amd64_v1
- linux_arm64
- linux_arm_7
- darwin_amd64_v1
- darwin_arm64
- windows_amd64_v1
overrides:
- goos: darwin
goarch: amd64
goamd64: v1
env:
# CGo is needed for github.com/fsnotify/fsevents, which is needed by (probably) the Docker
# Compose CLI
- CGO_ENABLED=1
# These toolchains are the ones provided by the goreleaser-cross Docker image:
- CC=o64-clang
- CXX=o64-clang++
- goos: darwin
goarch: arm64
env:
# CGo is needed for github.com/fsnotify/fsevents, which is needed by (probably) the Docker
# Compose CLI
- CGO_ENABLED=1
# These toolchains are the ones provided by the goreleaser-cross Docker image:
- CC=oa64-clang
- CXX=oa64-clang++
archives:
- id: forklift
builds: ["forklift"]
name_template: "forklift_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
format_overrides:
- goos: windows
format: zip
release:
github:
prerelease: auto
dockers:
# forklift
- id: forklift-amd64
ids:
- forklift
dockerfile: "Dockerfile"
use: buildx
image_templates:
- "ghcr.io/planktoscope/forklift:latest-amd64"
- "ghcr.io/planktoscope/forklift:{{ .Major }}-amd64"
- "ghcr.io/planktoscope/forklift:{{ .Major }}.{{ .Minor }}-amd64"
- "ghcr.io/planktoscope/forklift:{{ .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: forklift-arm64v8
ids:
- forklift
dockerfile: "Dockerfile"
use: buildx
goarch: arm64
image_templates:
- "ghcr.io/planktoscope/forklift:latest-arm64v8"
- "ghcr.io/planktoscope/forklift:{{ .Major }}-arm64v8"
- "ghcr.io/planktoscope/forklift:{{ .Major }}.{{ .Minor }}-arm64v8"
- "ghcr.io/planktoscope/forklift:{{ .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: forklift-armv7
ids:
- forklift
dockerfile: "Dockerfile"
use: buildx
goarch: arm
goarm: 7
image_templates:
- "ghcr.io/planktoscope/forklift:latest-armv7"
- "ghcr.io/planktoscope/forklift:{{ .Major }}-armv7"
- "ghcr.io/planktoscope/forklift:{{ .Major }}.{{ .Minor }}-armv7"
- "ghcr.io/planktoscope/forklift:{{ .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:
# forklift
- name_template: "ghcr.io/planktoscope/forklift:latest"
image_templates:
- "ghcr.io/planktoscope/forklift:latest-amd64"
- "ghcr.io/planktoscope/forklift:latest-arm64v8"
- "ghcr.io/planktoscope/forklift:latest-armv7"
- name_template: "ghcr.io/planktoscope/forklift:{{ .Major }}"
image_templates:
- "ghcr.io/planktoscope/forklift:{{ .Major }}-amd64"
- "ghcr.io/planktoscope/forklift:{{ .Major }}-arm64v8"
- "ghcr.io/planktoscope/forklift:{{ .Major }}-armv7"
- name_template: "ghcr.io/planktoscope/forklift:{{ .Major }}.{{ .Minor }}"
image_templates:
- "ghcr.io/planktoscope/forklift:{{ .Major }}.{{ .Minor }}-amd64"
- "ghcr.io/planktoscope/forklift:{{ .Major }}.{{ .Minor }}-arm64v8"
- "ghcr.io/planktoscope/forklift:{{ .Major }}.{{ .Minor }}-armv7"
- name_template: "ghcr.io/planktoscope/forklift:{{ .Major }}.{{ .Minor }}.{{ .Patch }}"
image_templates:
- "ghcr.io/planktoscope/forklift:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
- "ghcr.io/planktoscope/forklift:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64v8"
- "ghcr.io/planktoscope/forklift:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-armv7"