This repository has been archived by the owner on Jan 21, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.goreleaser.yaml
123 lines (113 loc) · 4.03 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# SPDX-FileCopyrightText: 2023 Iván SZKIBA
#
# SPDX-License-Identifier: AGPL-3.0-only
project_name: k6x
env:
- OWNER=szkiba
before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
goos: [ 'darwin', 'linux', 'windows' ]
goarch: [ 'amd64', 'arm64' ]
ldflags:
- '-s -w -X {{.ModulePath}}/internal/cmd._version={{.Version}} -X {{.ModulePath}}/internal/cmd._appname={{.ProjectName}} -X {{.ModulePath}}/internal/cmd._owner={{index .Env "GITHUB_REPOSITORY_OWNER"}}'
source:
enabled: true
name_template: '{{ .ProjectName }}_{{ .Version }}_source'
archives:
- id: bundle
format: tar.gz
format_overrides:
- goos: windows
format: zip
nfpms:
- package_name: '{{.ProjectName}}'
vendor: Iván Szkiba
maintainer: Iván Szkiba <[email protected]>
description: |-
Automatic k6 provisioning with extensions.
license: AGPL-3.0-only
formats: [ 'deb', 'rpm' ]
umask: 0o022
overrides:
deb:
contents:
- src: LICENSE
dst: /usr/share/doc/{{.ProjectName}}/copyright
- src: README.md
dst: /usr/share/doc/{{.ProjectName}}/README.md
rpm:
contents:
- src: LICENSE
dst: /usr/share/doc/{{.ProjectName}}/LICENSE
- src: README.md
dst: /usr/share/doc/{{.ProjectName}}/README.md
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:'
dockers:
- id: amd64
dockerfile: Dockerfile.goreleaser
use: buildx
image_templates:
- "{{ .Env.OWNER }}/{{ .ProjectName }}:{{ .Tag }}-amd64"
- "{{ .Env.OWNER }}/{{ .ProjectName }}:v{{ .Major }}-amd64"
- "{{ .Env.OWNER }}/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}-amd64"
- "{{ .Env.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.OWNER }}/{{ .ProjectName }}:{{ .Tag }}-arm64"
- "{{ .Env.OWNER }}/{{ .ProjectName }}:v{{ .Major }}-arm64"
- "{{ .Env.OWNER }}/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}-arm64"
- "{{ .Env.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.OWNER }}/{{ .ProjectName }}:{{ .Tag }}"
image_templates:
- "{{ .Env.OWNER }}/{{ .ProjectName }}:{{ .Tag }}-amd64"
- "{{ .Env.OWNER }}/{{ .ProjectName }}:{{ .Tag }}-arm64"
- id: major
name_template: "{{ .Env.OWNER }}/{{ .ProjectName }}:v{{ .Major }}"
image_templates:
- "{{ .Env.OWNER }}/{{ .ProjectName }}:v{{ .Major }}-amd64"
- "{{ .Env.OWNER }}/{{ .ProjectName }}:v{{ .Major }}-arm64"
- id: major-minor
name_template: "{{ .Env.OWNER }}/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}"
image_templates:
- "{{ .Env.OWNER }}/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}-amd64"
- "{{ .Env.OWNER }}/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}-arm64"
- id: latest
name_template: "{{ .Env.OWNER }}/{{ .ProjectName }}:latest"
image_templates:
- "{{ .Env.OWNER }}/{{ .ProjectName }}:latest-amd64"
- "{{ .Env.OWNER }}/{{ .ProjectName }}:latest-arm64"