From 41040ba1e236ecd36cb99abfdafcf14e98a30bc4 Mon Sep 17 00:00:00 2001 From: Sergei Maklagin Date: Fri, 29 May 2026 04:38:59 +0300 Subject: [PATCH] Update release pipeline --- .goreleaser.yaml | 76 ++++++++++++++++++++++++++++++++++++++++++++++++ Makefile | 12 ++------ 2 files changed, 78 insertions(+), 10 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index a90b13a2..632d35cc 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -94,6 +94,74 @@ builds: - android_arm64 - android_386 - android_amd64 + - id: compressed + <<: *template + targets: + - linux_386 + - linux_amd64_v1 + - linux_arm64 + - linux_arm_6 + - linux_arm_7 + - linux_riscv64 + - id: compressed-mips + <<: *template + tags: + - with_gvisor + - with_quic + - with_dhcp + - with_wireguard + - with_utls + - with_acme + - with_clash_api + - with_tailscale + - with_masque + - with_mtproxy + targets: + - linux_mips + - linux_mips_softfloat + - linux_mipsle + - linux_mipsle_softfloat + - id: compressed-android + <<: *template + env: + - CGO_ENABLED=1 + - GOTOOLCHAIN=local + overrides: + - goos: android + goarch: arm + goarm: 7 + env: + - CC=armv7a-linux-androideabi21-clang + - CXX=armv7a-linux-androideabi21-clang++ + - goos: android + goarch: arm64 + env: + - CC=aarch64-linux-android21-clang + - CXX=aarch64-linux-android21-clang++ + - goos: android + goarch: 386 + env: + - CC=i686-linux-android21-clang + - CXX=i686-linux-android21-clang++ + - goos: android + goarch: amd64 + goamd64: v1 + env: + - CC=x86_64-linux-android21-clang + - CXX=x86_64-linux-android21-clang++ + targets: + - android_arm_7 + - android_arm64 + - android_386 + - android_amd64 +upx: + - enabled: true + ids: + - compressed + - compressed-mips + - compressed-android + compress: best + lzma: true archives: - &template id: archive @@ -116,6 +184,13 @@ archives: builds: - legacy name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}-legacy' + - id: archive-compressed + <<: *template + builds: + - compressed + - compressed-mips + - compressed-android + name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ if and .Mips (not (eq .Mips "hardfloat")) }}-{{ .Mips }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}-compressed' source: enabled: false name_template: '{{ .ProjectName }}-{{ .Version }}.source' @@ -134,5 +209,6 @@ release: mode: replace ids: - archive + - archive-compressed - package skip_upload: true diff --git a/Makefile b/Makefile index 519739b9..640cd974 100644 --- a/Makefile +++ b/Makefile @@ -28,21 +28,13 @@ build: export GOTOOLCHAIN=local && \ go build $(MAIN_PARAMS) $(MAIN) -admin_panel_web: +build_admin_panel: cd $(ADMIN_PANEL_WEB) && \ npm install --no-fund --no-audit && \ npm run build - -admin_panel_pack: go run ./cmd/internal/admin_panel_pack \ -dir $(ADMIN_PANEL_DIST) -admin_panel_regen: admin_panel_web admin_panel_pack - -build_admin_panel: - export GOTOOLCHAIN=local && \ - go build $(PARAMS) -tags "$(ADMIN_PANEL_TAGS)" $(MAIN) - race: export GOTOOLCHAIN=local && \ go build -race $(MAIN_PARAMS) $(MAIN) @@ -86,7 +78,7 @@ proto_install: update_certificates: go run ./cmd/internal/update_certificates -release: +release: build_admin_panel go run ./cmd/internal/build goreleaser release --skip=validate --clean -p 3 --skip publish mkdir dist/release mv dist/*.tar.gz \