-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
161 lines (152 loc) · 4.75 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
version: 2
builds:
- id: default
main: ./cmd/hops
binary: bin/hops
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- -s -w -X main.version={{.Tag}}
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
archives:
- id: default
builds: [default]
format: tar.gz
name_template: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}"
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
dockers:
# linux/amd64 image
- id: hops-amd64
goos: linux
goarch: amd64
ids: [default]
image_templates:
- "ghcr.io/act3-ai/hops:{{ .Tag }}_amd64"
- "ghcr.io/act3-ai/hops:v{{ .Major }}_amd64"
- "ghcr.io/act3-ai/hops:v{{ .Major }}.{{ .Minor }}_amd64"
- "{{if not .Prerelease}}ghcr.io/act3-ai/hops:latest_amd64{{end}}"
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
- "--build-arg=HOPS_EXECUTABLE=bin/hops"
- "--label=org.opencontainers.image.created={{.CommitDate}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Tag}}"
# linux/arm64 image
- id: hops-arm64
goos: linux
goarch: arm64
ids: [default]
image_templates:
- "ghcr.io/act3-ai/hops:{{ .Tag }}_arm64"
- "ghcr.io/act3-ai/hops:v{{ .Major }}_arm64"
- "ghcr.io/act3-ai/hops:v{{ .Major }}.{{ .Minor }}_arm64"
- "{{if not .Prerelease}}ghcr.io/act3-ai/hops:latest_arm64{{end}}"
build_flag_templates:
- "--pull"
- "--platform=linux/arm64"
- "--build-arg=HOPS_EXECUTABLE=bin/hops"
- "--label=org.opencontainers.image.created={{.CommitDate}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Tag}}"
docker_manifests:
- id: default
skip_push: false
name_template: ghcr.io/act3-ai/hops:{{ .Tag }}
image_templates:
- "ghcr.io/act3-ai/hops:{{ .Tag }}_amd64"
- "ghcr.io/act3-ai/hops:{{ .Tag }}_arm64"
- id: major
skip_push: auto
name_template: "ghcr.io/act3-ai/hops:v{{ .Major }}"
image_templates:
- "ghcr.io/act3-ai/hops:{{ .Tag }}_amd64"
- "ghcr.io/act3-ai/hops:{{ .Tag }}_arm64"
- id: majorminor
skip_push: auto
name_template: "ghcr.io/act3-ai/hops:v{{ .Major }}.{{ .Minor }}"
image_templates:
- "ghcr.io/act3-ai/hops:{{ .Tag }}_amd64"
- "ghcr.io/act3-ai/hops:{{ .Tag }}_arm64"
- id: latest
skip_push: auto
name_template: "ghcr.io/act3-ai/hops:latest"
image_templates:
- "ghcr.io/act3-ai/hops:{{ .Tag }}_amd64"
- "ghcr.io/act3-ai/hops:{{ .Tag }}_arm64"
kos:
- id: hops-slim
build: default
platforms:
- all
base_image: chainguard/static
repository: ghcr.io/act3-ai/hops-slim
base_import_paths: false
preserve_import_paths: false
bare: true
tags:
- "{{.Tag}}"
- "{{if not .Prerelease}}v{{ .Major }}{{end}}"
- "{{if not .Prerelease}}v{{ .Major }}.{{ .Minor }}{{end}}"
- "{{if not .Prerelease}}latest{{end}}"
creation_time: "{{.CommitTimestamp}}"
ko_data_creation_time: "{{.CommitTimestamp}}"
sbom: spdx
labels:
org.opencontainers.image.title: "hops-slim"
org.opencontainers.image.description: "Hops is a Homebrew Bottle installer with a focus on performance and mobility."
org.opencontainers.image.revision: "{{.FullCommit}}"
org.opencontainers.image.version: "{{.Tag}}"
org.opencontainers.image.licenses: "MIT"
org.opencontainers.image.source: "{{.GitURL}}"
org.opencontainers.image.documentation: "{{.GitURL}}"
org.opencontainers.image.url: "{{.GitURL}}"
report_sizes: true
release:
prerelease: auto
replace_existing_draft: true
replace_existing_artifacts: true
target_commitish: "{{ .Commit }}"
make_latest: "{{ not .Prerelease }}"
name_template: "{{.Tag}}"
brews:
- name: hops
ids: [default]
commit_author:
name: goreleaser[bot]
email: bot@goreleaser.com
commit_msg_template: |
fix(hops): updated to {{.Tag}}
directory: Formula
homepage: https://github.com/act3-ai/hops
description: "Homebrew Bottle installer with a focus on performance and mobility."
license: "MIT"
skip_upload: auto
test: |
system "#{bin}/hops --version"
extra_install: |
generate_completions_from_executable(bin/"hops", "completion")
# Generate manpages
mkdir "man" do
system bin/"hops", "gendocs", "man", "."
man1.install Dir["*.1"]
# man5.install Dir["*.5"]
end
repository:
owner: act3-ai
name: homebrew-tap
branch: bump-hops-{{.Tag}}
git:
url: git@github.com:act3-ai/homebrew-tap.git
private_key: "{{.Env.TAP_DEPLOY_KEY}}"