mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-07 14:09:07 +02:00
143 lines
5.1 KiB
YAML
143 lines
5.1 KiB
YAML
version: 2
|
|
env:
|
|
- SKIP_PUBLISH={{ if index .Env "SKIP_PUBLISH" }}{{ .Env.SKIP_PUBLISH }}{{ else }}true{{ end }}
|
|
project_name: netbird-ui
|
|
|
|
before:
|
|
hooks:
|
|
# Bindings are gitignored; regenerate before the frontend build so
|
|
# the @wailsio/runtime Vite plugin can resolve them (vite refuses to
|
|
# build without them).
|
|
# -f '-tags gtk3': the generator type-checks client/ui, whose cgo imports
|
|
# would otherwise resolve gtk4/webkitgtk-6.0 pkg-config entries that do
|
|
# not exist on ubuntu-22.04.
|
|
- sh -c 'cd client/ui && wails3 generate bindings -clean=true -ts -f "-tags gtk3"'
|
|
- sh -c 'cd client/ui/frontend && pnpm install --frozen-lockfile && pnpm build'
|
|
|
|
builds:
|
|
# Legacy GTK3 / WebKit2GTK 4.1 build for distros without WebKitGTK 6.0
|
|
# (Ubuntu 22.04, Debian 12, RHEL 9, Fedora <=39). The gtk3 tag flips the
|
|
# Wails Linux backend to the GTK3 stack and swaps our GTK4-only XEmbed
|
|
# tray host for the pure-Go stub (client/ui/xembed_host_gtk3_linux.go).
|
|
# Must be built on the oldest supported glibc (ubuntu-22.04 runner).
|
|
- id: netbird-ui-gtk3
|
|
dir: client/ui
|
|
binary: netbird-ui
|
|
env:
|
|
- CGO_ENABLED=1
|
|
goos:
|
|
- linux
|
|
goarch:
|
|
- amd64
|
|
ldflags:
|
|
- -s -w -X github.com/netbirdio/netbird/version.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}} -X main.builtBy=goreleaser
|
|
mod_timestamp: "{{ .CommitTimestamp }}"
|
|
tags:
|
|
- production
|
|
- gtk3
|
|
|
|
archives:
|
|
- id: linux-gtk3-arch
|
|
name_template: "{{ .ProjectName }}-linux-gtk3_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
|
builds:
|
|
- netbird-ui-gtk3
|
|
|
|
nfpms:
|
|
# Same package_name as the GTK4 packages -- the two are mutually-exclusive
|
|
# alternatives served from separate repo paths (see uploads below); a given
|
|
# distro points at exactly one of them. The file names must still differ:
|
|
# the Debian pool is shared storage keyed by file name, so a default-named
|
|
# gtk3 .deb would overwrite the stable one.
|
|
- maintainer: Netbird <dev@netbird.io>
|
|
description: Netbird client UI.
|
|
homepage: https://netbird.io/
|
|
license: BSD-3-Clause
|
|
vendor: NetBird
|
|
id: netbird_ui_deb_gtk3
|
|
package_name: netbird-ui
|
|
file_name_template: "{{ .PackageName }}-gtk3_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
|
builds:
|
|
- netbird-ui-gtk3
|
|
formats:
|
|
- deb
|
|
scripts:
|
|
postinstall: "release_files/ui-post-install.sh"
|
|
contents:
|
|
- src: client/ui/build/linux/netbird.desktop
|
|
dst: /usr/share/applications/org.wails.netbird.desktop
|
|
- src: client/ui/build/appicon.png
|
|
dst: /usr/share/pixmaps/netbird.png
|
|
dependencies:
|
|
- netbird (>= 0.75.0)
|
|
- libgtk-3-0
|
|
- libwebkit2gtk-4.1-0
|
|
- xdg-utils
|
|
|
|
- maintainer: Netbird <dev@netbird.io>
|
|
description: Netbird client UI.
|
|
homepage: https://netbird.io/
|
|
license: BSD-3-Clause
|
|
vendor: NetBird
|
|
id: netbird_ui_rpm_gtk3
|
|
package_name: netbird-ui
|
|
file_name_template: "{{ .PackageName }}-gtk3_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
|
builds:
|
|
- netbird-ui-gtk3
|
|
formats:
|
|
- rpm
|
|
scripts:
|
|
postinstall: "release_files/ui-post-install.sh"
|
|
contents:
|
|
- src: client/ui/build/linux/netbird.desktop
|
|
dst: /usr/share/applications/org.wails.netbird.desktop
|
|
- src: client/ui/build/appicon.png
|
|
dst: /usr/share/pixmaps/netbird.png
|
|
dependencies:
|
|
- netbird >= 0.75.0
|
|
- (gtk3 or libgtk-3-0)
|
|
- (webkit2gtk4.1 or libwebkit2gtk-4_1-0)
|
|
- xdg-utils
|
|
|
|
rpm:
|
|
signature:
|
|
key_file: '{{ if index .Env "GPG_RPM_KEY_FILE" }}{{ .Env.GPG_RPM_KEY_FILE }}{{ end }}'
|
|
|
|
# The GTK4 UI job shares project_name, so the default checksum file name would
|
|
# collide with it on the shared GitHub release.
|
|
checksum:
|
|
name_template: "{{ .ProjectName }}_gtk3_checksums.txt"
|
|
|
|
changelog:
|
|
disable: true
|
|
|
|
uploads:
|
|
# The gtk3 packages reuse the netbird-ui package name, so they live in
|
|
# dedicated repo paths (deb distribution `gtk3`, yum path `yum-gtk3`) that
|
|
# legacy distros point their repo config at.
|
|
#
|
|
# GoReleaser derives the credential env var from the upload name, so these
|
|
# would look for UPLOAD_DEBIAN-GTK3_SECRET / UPLOAD_YUM-GTK3_SECRET. The
|
|
# release workflow only exports UPLOAD_DEBIAN_SECRET / UPLOAD_YUM_SECRET, and
|
|
# a missing secret is a silent skip rather than a failure -- the packages
|
|
# reached the GitHub release but never the package repositories. Point
|
|
# `password` at the exported vars so both uploads authenticate.
|
|
- name: debian-gtk3
|
|
skip: "{{ .Env.SKIP_PUBLISH }}"
|
|
ids:
|
|
- netbird_ui_deb_gtk3
|
|
mode: archive
|
|
target: https://pkgs.wiretrustee.com/debian/pool/{{ .ArtifactName }};deb.distribution=gtk3;deb.component=main;deb.architecture={{ if .Arm }}armhf{{ else }}{{ .Arch }}{{ end }};deb.package=
|
|
username: dev@wiretrustee.com
|
|
password: "{{ .Env.UPLOAD_DEBIAN_SECRET }}"
|
|
method: PUT
|
|
|
|
- name: yum-gtk3
|
|
skip: "{{ .Env.SKIP_PUBLISH }}"
|
|
ids:
|
|
- netbird_ui_rpm_gtk3
|
|
mode: archive
|
|
target: https://pkgs.wiretrustee.com/yum-gtk3/{{ .Arch }}{{ if .Arm }}{{ .Arm }}{{ end }}
|
|
username: dev@wiretrustee.com
|
|
password: "{{ .Env.UPLOAD_YUM_SECRET }}"
|
|
method: PUT
|