-
-
Notifications
You must be signed in to change notification settings - Fork 52
/
.goreleaser.yaml
199 lines (180 loc) · 5.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
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
# The lines below are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 1
env:
- BACKREST_BUILD_VERSION={{.Version}}
before:
hooks:
- go mod tidy
- pnpm --prefix webui install
- sh -c "GOOS=linux BACKREST_BUILD_VERSION={{.Version}} go generate ./..."
- sh -c "GOOS=windows BACKREST_BUILD_VERSION={{.Version}} go generate ./..."
builds:
- id: other
main: ./cmd/backrest
env:
- CGO_ENABLED=0
goos:
- darwin
- windows
- freebsd
goarch:
- amd64
- arm64
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
- id: linux
main: ./cmd/backrest
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
- arm
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
- id: backrestmon
main: ./cmd/backrestmon
binary: backrest-windows-tray
env:
- CGO_ENABLED=1
- GO111MODULE=on
ldflags: -H=windowsgui
goos:
- windows
goarch:
- amd64
- arm64
archives:
- format: tar.gz
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
format_overrides:
- goos: windows
format: zip
files:
- install.sh
- uninstall.sh
- LICENSE
- README.md
- CHANGELOG.md
allow_different_binary_count: true
dockers:
- image_templates:
- garethgeorge/backrest:{{ .Tag }}-alpine-amd64
dockerfile: Dockerfile.alpine
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
- image_templates:
- garethgeorge/backrest:{{ .Tag }}-alpine-arm64
dockerfile: Dockerfile.alpine
goarch: arm64
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/arm64/v8"
- image_templates:
- garethgeorge/backrest:{{ .Tag }}-scratch-arm64
dockerfile: Dockerfile.scratch
goarch: arm64
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/arm64/v8"
- image_templates:
- garethgeorge/backrest:{{ .Tag }}-scratch-amd64
dockerfile: Dockerfile.scratch
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
- image_templates:
- garethgeorge/backrest:{{ .Tag }}-scratch-armv6
dockerfile: Dockerfile.scratch
use: buildx
goarch: arm
goarm: 6
build_flag_templates:
- "--pull"
- "--platform=linux/arm/v6"
docker_manifests:
- name_template: "garethgeorge/backrest:latest"
image_templates:
- "garethgeorge/backrest:{{ .Tag }}-alpine-amd64"
- "garethgeorge/backrest:{{ .Tag }}-alpine-arm64"
- name_template: "garethgeorge/backrest:v{{ .Major }}"
image_templates:
- "garethgeorge/backrest:{{ .Tag }}-alpine-amd64"
- "garethgeorge/backrest:{{ .Tag }}-alpine-arm64"
- name_template: "garethgeorge/backrest:v{{ .Major }}.{{ .Minor }}"
image_templates:
- "garethgeorge/backrest:{{ .Tag }}-alpine-amd64"
- "garethgeorge/backrest:{{ .Tag }}-alpine-arm64"
- name_template: "garethgeorge/backrest:{{ .Tag }}"
image_templates:
- "garethgeorge/backrest:{{ .Tag }}-alpine-amd64"
- "garethgeorge/backrest:{{ .Tag }}-alpine-arm64"
- name_template: "garethgeorge/backrest:latest-alpine"
image_templates:
- "garethgeorge/backrest:{{ .Tag }}-alpine-amd64"
- "garethgeorge/backrest:{{ .Tag }}-alpine-arm64"
- name_template: "garethgeorge/backrest:scratch"
image_templates:
- "garethgeorge/backrest:{{ .Tag }}-scratch-amd64"
- "garethgeorge/backrest:{{ .Tag }}-scratch-arm64"
- "garethgeorge/backrest:{{ .Tag }}-scratch-armv6"
- name_template: "garethgeorge/backrest:v{{ .Major }}-scratch"
image_templates:
- "garethgeorge/backrest:{{ .Tag }}-scratch-amd64"
- "garethgeorge/backrest:{{ .Tag }}-scratch-arm64"
- "garethgeorge/backrest:{{ .Tag }}-scratch-armv6"
- name_template: "garethgeorge/backrest:v{{ .Major }}.{{ .Minor }}-scratch"
image_templates:
- "garethgeorge/backrest:{{ .Tag }}-scratch-amd64"
- "garethgeorge/backrest:{{ .Tag }}-scratch-arm64"
- "garethgeorge/backrest:{{ .Tag }}-scratch-armv6"
- name_template: "garethgeorge/backrest:{{ .Tag }}-scratch"
image_templates:
- "garethgeorge/backrest:{{ .Tag }}-scratch-amd64"
- "garethgeorge/backrest:{{ .Tag }}-scratch-arm64"
- "garethgeorge/backrest:{{ .Tag }}-scratch-armv6"
brews:
- name: backrest
homepage: https://github.com/garethgeorge/backrest
description: "Backrest is a web UI and orchestrator for restic backup."
url_template: "https://github.com/garethgeorge/backrest/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
commit_author:
name: goreleaserbot
email: bot@goreleaser.com
repository:
owner: garethgeorge
name: homebrew-backrest-tap
branch: main
token: "{{ .Env.HOMEBREW_GITHUB_TOKEN }}"
service: |
run opt_bin/"backrest"
error_log_path var/"log/backrest.log"
log_path var/"log/backrest.log"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
release:
github:
owner: garethgeorge
name: backrest