Debian Codegraph @

.goreleaser.yaml

raw
1 # yaml-language-server: $schema=https://goreleaser.com/static/schema.json
2
3 version: 2
4 before:
5 hooks:
6 - rm -rf 3rdpartylicenses
7 - make 3rdpartylicenses
8
9 builds:
10 - id: "openvpn-auth-oauth2"
11 binary: openvpn-auth-oauth2
12 main: ./cmd/openvpn-auth-oauth2
13 goos:
14 - linux
15 - freebsd
16 - openbsd
17 goarch:
18 - amd64
19 - arm64
20 mod_timestamp: '{{ .CommitTimestamp }}'
21 env:
22 - CGO_ENABLED=0
23 tags:
24 - no_otel
25 flags:
26 - -trimpath
27 ldflags:
28 - >-
29 -s -w
30 -X github.com/jkroepke/openvpn-auth-oauth2/v2/internal/version.Version={{.Version}}
31 -X github.com/jkroepke/openvpn-auth-oauth2/v2/internal/version.Commit={{.Commit}}
32 -X github.com/jkroepke/openvpn-auth-oauth2/v2/internal/version.Date={{.Date}}
33
34 - id: "openvpn-auth-oauth2.so"
35 binary: openvpn-auth-oauth2
36 main: ./lib/openvpn-auth-oauth2
37 buildmode: c-shared
38 env:
39 - CGO_ENABLED=1
40 - >-
41 {{- if and (eq .Os "linux") (eq .Arch "amd64")}}CC=zig cc -target x86_64-linux-gnu.2.17{{- end }}
42 {{- if and (eq .Os "linux") (eq .Arch "arm64")}}CC=zig cc -target aarch64-linux-gnu.2.17{{- end }}
43 {{- if and (eq .Os "freebsd") (eq .Arch "amd64")}}CC=zig cc -target x86_64-freebsd.14.0{{- end }}
44 goos:
45 - linux
46 - freebsd
47 goarch:
48 - amd64
49 - arm64
50 ignore:
51 # Go does not support -buildmode=c-shared for freebsd/arm64.
52 - goos: freebsd
53 goarch: arm64
54 mod_timestamp: '{{ .CommitTimestamp }}'
55 tags:
56 - no_otel
57 flags:
58 - -trimpath
59 ldflags:
60 - >-
61 -s -w
62 -X github.com/jkroepke/openvpn-auth-oauth2/v2/internal/version.Version={{.Version}}
63 -X github.com/jkroepke/openvpn-auth-oauth2/v2/internal/version.Commit={{.Commit}}
64 -X github.com/jkroepke/openvpn-auth-oauth2/v2/internal/version.Date={{.Date}}
65
66 archives:
67 - id: openvpn-auth-oauth2
68 ids:
69 - openvpn-auth-oauth2
70 - openvpn-auth-oauth2.so
71 allow_different_binary_count: true
72 formats: ['tar.xz']
73 files:
74 - LICENSE.txt
75 - 3rdpartylicenses/**/*
76
77 nfpms:
78 - id: openvpn-auth-oauth2
79 ids:
80 - openvpn-auth-oauth2
81 - openvpn-auth-oauth2.so
82 homepage: https://github.com/jkroepke/openvpn-auth-oauth2
83 maintainer: Jan-Otto Kröpke <[email protected]>
84 section: net
85 description: |
86 openvpn-auth-oauth2 is a management client for OpenVPN that handles the authentication of connecting users against OIDC providers like Azure AD or Keycloak.
87 license: MIT License
88 libdirs:
89 header: /usr/include/openvpn-auth-oauth2
90 cshared: /usr/lib/openvpn
91 formats:
92 - deb
93 - rpm
94 provides:
95 - openvpn-auth-oauth2
96 recommends:
97 - openvpn
98 contents:
99 - src: packaging/usr/lib/sysusers.d/
100 dst: /usr/lib/sysusers.d/
101 - src: packaging/usr/lib/systemd/system/
102 dst: /usr/lib/systemd/system/
103 - src: packaging/etc/apparmor.d/
104 dst: /etc/apparmor.d/
105 - src: packaging/etc/sysconfig/openvpn-auth-oauth2
106 file_info:
107 mode: 0640
108 dst: /etc/sysconfig/openvpn-auth-oauth2
109 type: "config|noreplace"
110 - dst: /etc/openvpn-auth-oauth2/
111 type: dir
112 file_info:
113 owner: root
114 group: openvpn-auth-oauth2
115 mode: 0750
116 - dst: /etc/openvpn-auth-oauth2/client-config/
117 type: dir
118 file_info:
119 owner: root
120 group: openvpn-auth-oauth2
121 mode: 0750
122 - src: packaging/etc/openvpn-auth-oauth2/config.yaml
123 dst: /etc/openvpn-auth-oauth2/config.yaml
124 type: "config|noreplace"
125 file_info:
126 owner: root
127 group: openvpn-auth-oauth2
128 mode: 0640
129 - src: 3rdpartylicenses/
130 dst: /usr/share/doc/openvpn-auth-oauth2/3rdpartylicenses/
131 type: tree
132 file_info:
133 owner: root
134 group: root
135 mode: 0644
136 scripts:
137 preinstall: "packaging/scripts/preinst.sh"
138 postinstall: "packaging/scripts/postinst.sh"
139 preremove: "packaging/scripts/preremove.sh"
140 postremove: "packaging/scripts/postremove.sh"
141 rpm:
142 compression: xz
143 signature:
144 key_file: "{{ .Env.GPG_KEY_PATH }}"
145 deb:
146 #compression: xz
147 signature:
148 key_file: "{{ .Env.GPG_KEY_PATH }}"
149
150 sboms:
151 - artifacts: archive
152
153 report_sizes: true
154
155 metadata:
156 mod_timestamp: "{{ .CommitTimestamp }}"
157
158 gomod:
159 proxy: true
160
161 release:
162 draft: true
163 replace_existing_draft: true
164 prerelease: auto
165
166 changelog:
167 use: github-native
168
169 # https://goreleaser.com/customization/attestations/
170 checksum:
171 name_template: "checksums.txt"