forked from authelia/authelia
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yml
More file actions
225 lines (208 loc) · 6.32 KB
/
Copy path.goreleaser.yml
File metadata and controls
225 lines (208 loc) · 6.32 KB
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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
---
version: 2
project_name: authelia
dist: goreleaser
before:
hooks:
- |
bash -c 'cat > postinstall.sh <<EOF
#!/bin/sh
sed -i -e "s/u!/u /" /usr/lib/sysusers.d/authelia.conf
systemd-sysusers
systemd-tmpfiles --create
EOF
chmod +x postinstall.sh'
builds:
- id: glibc
main: ./cmd/authelia
env:
- CGO_CFLAGS=-O2 -pipe -fno-plt -fstack-protector-strong
- CGO_CPPFLAGS=-D_FORTIFY_SOURCE=3
- CGO_CXXFLAGS=-O2 -pipe -fno-plt
- CGO_LDFLAGS=-Wl,-O1,-sort-common,-as-needed,-z,relro,-z,now
- CGO_ENABLED=1
flags: -trimpath
buildmode: pie
goos:
- linux
- freebsd
goarch:
- amd64
- arm
- arm64
binary: '{{ .ProjectName }}'
ldflags:
- '-linkmode=external -s -w {{ .Env.XFLAGS }}'
ignore:
- goos: freebsd
goarch: arm
- goos: freebsd
goarch: arm64
overrides:
- goos: linux
goarch: arm
env:
- CC=arm-linux-gnueabihf-gcc
- goos: linux
goarch: arm64
env:
- CC=aarch64-linux-gnu-gcc
- goos: freebsd
goarch: amd64
env:
- CC=x86_64-pc-freebsd14-gcc
- id: musl
main: ./cmd/authelia
env:
- CGO_CFLAGS=-O2 -pipe -fno-plt -fstack-protector-strong
- CGO_CPPFLAGS=-I/usr/local/include/fortify -D_FORTIFY_SOURCE=3
- CGO_CXXFLAGS=-O2 -pipe -fno-plt
- CGO_LDFLAGS=-Wl,-O1,-sort-common,-as-needed,-z,relro,-z,now
- CGO_ENABLED=1
flags: -trimpath
buildmode: pie
goos:
- linux
goarch:
- amd64
- arm
- arm64
binary: '{{ .ProjectName }}'
ldflags:
- '-linkmode=external -s -w {{ .Env.XFLAGS }}'
overrides:
- goos: linux
goarch: amd64
env:
- CC=x86_64-linux-musl-cc
- goos: linux
goarch: arm
env:
- CC=arm-linux-musleabihf-cc
- goos: linux
goarch: arm64
env:
- CC=aarch64-linux-musl-cc
archives:
- id: linux-glibc
ids: [glibc]
formats: tar.gz
name_template: '{{ .ProjectName }}{{ if .Env.BUILDKITE_TAG }}-{{ .Env.BUILDKITE_TAG }}{{ end }}-{{ .Os }}-{{ .Arch }}' # yamllint disable-line rule:line-length
files:
- authelia.service
- authelia@.service
- authelia.sysusers.conf
- authelia.tmpfiles.conf
- authelia.tmpfiles.config.conf
- config.template.yml
format_overrides:
- goos: freebsd
formats: none
- id: linux-musl
ids: [musl]
formats: tar.gz
name_template: '{{ .ProjectName }}{{ if .Env.BUILDKITE_TAG }}-{{ .Env.BUILDKITE_TAG }}{{ end }}-{{ .Os }}-{{ .Arch }}-musl' # yamllint disable-line rule:line-length
files:
- authelia.service
- authelia@.service
- authelia.sysusers.conf
- authelia.tmpfiles.conf
- authelia.tmpfiles.config.conf
- config.template.yml
- id: freebsd
ids: [glibc]
formats: tar.gz
name_template: '{{ .ProjectName }}{{ if .Env.BUILDKITE_TAG }}-{{ .Env.BUILDKITE_TAG }}{{ end }}-{{ .Os }}-{{ .Arch }}' # yamllint disable-line rule:line-length
files:
- authelia-fb-rc.d
- config.template.yml
format_overrides:
- goos: linux
formats: none
- id: public_html
meta: true
formats: tar.gz
name_template: '{{ .ProjectName }}{{ if .Env.BUILDKITE_TAG }}-{{ .Env.BUILDKITE_TAG }}{{ end }}-public_html'
files:
- src: internal/server/public_html/**
dst: public_html
nfpms:
- id: debian
ids: [glibc]
formats: [deb]
file_name_template: '{{ .PackageName }}{{ if .Env.BUILDKITE_TAG }}_{{ trimprefix .Env.BUILDKITE_TAG "v" }}-1{{ end }}_{{ if eq .Arch "arm" }}armhf{{ else }}{{ .Arch }}{{ end }}.deb' # yamllint disable-line rule:line-length
vendor: Authelia
homepage: https://www.authelia.com
maintainer: Authelia Team <team@authelia.com>
description: |
Authelia is an open-source authentication and authorization server and portal fulfilling the identity and access
management (IAM) role of information security in providing multi-factor authentication and single sign-on (SSO)
for your applications via a web portal. Authelia is an OpenID Connect 1.0 Provider which is OpenID Certified™
allowing comprehensive integrations and acts as a companion for common reverse proxies.
license: Apache-2.0
provides:
- authelia
release: 1
section: default
priority: extra
contents:
- src: config.template.yml
dst: /etc/authelia/configuration.yml
type: config|noreplace
file_info:
mode: 0440 # yamllint disable-line rule:octal-values
- src: authelia.service
dst: /usr/lib/systemd/system/authelia.service
- src: authelia@.service
dst: /usr/lib/systemd/system/authelia@.service
- src: authelia.sysusers.conf
dst: /usr/lib/sysusers.d/authelia.conf
- src: authelia.tmpfiles.conf
dst: /usr/lib/tmpfiles.d/authelia.conf
- src: authelia.tmpfiles.config.conf
dst: /usr/lib/tmpfiles.d/authelia-config.conf
scripts:
postinstall: postinstall.sh
deb:
signature:
key_file: '{{ .Env.GPG_KEY_PATH }}'
sboms:
- id: cdx-backend
ids: [linux-glibc, linux-musl, freebsd]
documents:
- "${artifact}.cdx.json"
args: ["$artifact", "-o", "cyclonedx-json=$document"]
disable: false
- id: spdx-backend
ids: [linux-glibc, linux-musl, freebsd]
documents:
- "${artifact}.spdx.json"
args: ["$artifact", "-o", "spdx-json=$document"]
disable: false
- id: cdx-frontend
ids: [public_html]
documents:
- "${artifact}.cdx.json"
args: ["../web", "--source-name", "$artifact", "-o", "cyclonedx-json=$document"]
disable: false
- id: spdx-frontend
ids: [public_html]
documents:
- "${artifact}.spdx.json"
args: ["../web", "--source-name", "$artifact", "-o", "spdx-json=$document"]
disable: false
signs:
- id: gpg
signature: '${artifact}.sig'
args: [
"--batch", "--pinentry-mode", "loopback",
"-u", "security@authelia.com",
"--passphrase", "{{ .Env.GPG_PASSWORD }}",
"--output", "${signature}",
"--detach-sign", "${artifact}",
]
artifacts: checksum
checksum:
name_template: 'checksums.sha256'
...