-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yaml
87 lines (83 loc) · 2.61 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
version: 2
builds:
- &buildDefinition
id: go-cli-github
binary: go-cli-github
main: ./cmd/go-cli-github
ldflags:
- >
-s -w
-X "main.commit={{.Commit}}"
-X "main.date={{.Date}}"
-X "main.projectName={{.ProjectName}}"
-X "main.version=v{{.Version}}"
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
- <<: *buildDefinition
id: another-binary
binary: another-binary
main: ./cmd/another-binary
changelog:
use: github-native
dockers:
- ids:
- go-cli-github
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/go-cli-github:v{{ .Version }}-amd64"
use: buildx
build_flag_templates:
- "--build-arg=BINARY=go-cli-github"
- "--platform=linux/amd64"
- ids:
- go-cli-github
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/go-cli-github:v{{ .Version }}-arm64v8"
use: buildx
goarch: arm64
build_flag_templates:
- "--build-arg=BINARY=go-cli-github"
- "--platform=linux/arm64/v8"
- ids:
- another-binary
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/another-binary:v{{ .Version }}-amd64"
use: buildx
build_flag_templates:
- "--build-arg=BINARY=another-binary"
- "--platform=linux/amd64"
- ids:
- another-binary
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/another-binary:v{{ .Version }}-arm64v8"
use: buildx
goarch: arm64
build_flag_templates:
- "--build-arg=BINARY=another-binary"
- "--platform=linux/arm64/v8"
docker_manifests:
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/go-cli-github:v{{ .Version }}"
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/go-cli-github:v{{ .Version }}-amd64"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/go-cli-github:v{{ .Version }}-arm64v8"
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/go-cli-github:latest"
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/go-cli-github:v{{ .Version }}-amd64"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/go-cli-github:v{{ .Version }}-arm64v8"
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/another-binary:v{{ .Version }}"
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/another-binary:v{{ .Version }}-amd64"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/another-binary:v{{ .Version }}-arm64v8"
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/another-binary:latest"
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/another-binary:v{{ .Version }}-amd64"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/another-binary:v{{ .Version }}-arm64v8"
release:
extra_files:
- glob: "{{ .Env.GITHUB_SBOM_PATH }}"
name_template: "{{ .ProjectName }}.v{{ .Version }}.sbom.spdx.json"