# yaml-language-server: $schema=https://goreleaser.com/static/schema.json version: 2 before: hooks: - rm -rf 3rdpartylicenses - make 3rdpartylicenses builds: - id: "openvpn-auth-oauth2" binary: openvpn-auth-oauth2 main: ./cmd/openvpn-auth-oauth2 goos: - linux - freebsd - openbsd goarch: - amd64 - arm64 mod_timestamp: '{{ .CommitTimestamp }}' env: - CGO_ENABLED=0 tags: - no_otel flags: - -trimpath ldflags: - >- -s -w -X github.com/jkroepke/openvpn-auth-oauth2/v2/internal/version.Version={{.Version}} -X github.com/jkroepke/openvpn-auth-oauth2/v2/internal/version.Commit={{.Commit}} -X github.com/jkroepke/openvpn-auth-oauth2/v2/internal/version.Date={{.Date}} - id: "openvpn-auth-oauth2.so" binary: openvpn-auth-oauth2 main: ./lib/openvpn-auth-oauth2 buildmode: c-shared env: - CGO_ENABLED=1 - >- {{- if and (eq .Os "linux") (eq .Arch "amd64")}}CC=zig cc -target x86_64-linux-gnu.2.17{{- end }} {{- if and (eq .Os "linux") (eq .Arch "arm64")}}CC=zig cc -target aarch64-linux-gnu.2.17{{- end }} {{- if and (eq .Os "freebsd") (eq .Arch "amd64")}}CC=zig cc -target x86_64-freebsd.14.0{{- end }} goos: - linux - freebsd goarch: - amd64 - arm64 ignore: # Go does not support -buildmode=c-shared for freebsd/arm64. - goos: freebsd goarch: arm64 mod_timestamp: '{{ .CommitTimestamp }}' tags: - no_otel flags: - -trimpath ldflags: - >- -s -w -X github.com/jkroepke/openvpn-auth-oauth2/v2/internal/version.Version={{.Version}} -X github.com/jkroepke/openvpn-auth-oauth2/v2/internal/version.Commit={{.Commit}} -X github.com/jkroepke/openvpn-auth-oauth2/v2/internal/version.Date={{.Date}} archives: - id: openvpn-auth-oauth2 ids: - openvpn-auth-oauth2 - openvpn-auth-oauth2.so allow_different_binary_count: true formats: ['tar.xz'] files: - LICENSE.txt - 3rdpartylicenses/**/* nfpms: - id: openvpn-auth-oauth2 ids: - openvpn-auth-oauth2 - openvpn-auth-oauth2.so homepage: https://github.com/jkroepke/openvpn-auth-oauth2 maintainer: Jan-Otto Kröpke section: net description: | openvpn-auth-oauth2 is a management client for OpenVPN that handles the authentication of connecting users against OIDC providers like Azure AD or Keycloak. license: MIT License libdirs: header: /usr/include/openvpn-auth-oauth2 cshared: /usr/lib/openvpn formats: - deb - rpm provides: - openvpn-auth-oauth2 recommends: - openvpn contents: - src: packaging/usr/lib/sysusers.d/ dst: /usr/lib/sysusers.d/ - src: packaging/usr/lib/systemd/system/ dst: /usr/lib/systemd/system/ - src: packaging/etc/apparmor.d/ dst: /etc/apparmor.d/ - src: packaging/etc/sysconfig/openvpn-auth-oauth2 file_info: mode: 0640 dst: /etc/sysconfig/openvpn-auth-oauth2 type: "config|noreplace" - dst: /etc/openvpn-auth-oauth2/ type: dir file_info: owner: root group: openvpn-auth-oauth2 mode: 0750 - dst: /etc/openvpn-auth-oauth2/client-config/ type: dir file_info: owner: root group: openvpn-auth-oauth2 mode: 0750 - src: packaging/etc/openvpn-auth-oauth2/config.yaml dst: /etc/openvpn-auth-oauth2/config.yaml type: "config|noreplace" file_info: owner: root group: openvpn-auth-oauth2 mode: 0640 - src: 3rdpartylicenses/ dst: /usr/share/doc/openvpn-auth-oauth2/3rdpartylicenses/ type: tree file_info: owner: root group: root mode: 0644 scripts: preinstall: "packaging/scripts/preinst.sh" postinstall: "packaging/scripts/postinst.sh" preremove: "packaging/scripts/preremove.sh" postremove: "packaging/scripts/postremove.sh" rpm: compression: xz signature: key_file: "{{ .Env.GPG_KEY_PATH }}" deb: #compression: xz signature: key_file: "{{ .Env.GPG_KEY_PATH }}" sboms: - artifacts: archive report_sizes: true metadata: mod_timestamp: "{{ .CommitTimestamp }}" gomod: proxy: true release: draft: true replace_existing_draft: true prerelease: auto changelog: use: github-native # https://goreleaser.com/customization/attestations/ checksum: name_template: "checksums.txt"