From 1cbb5dadfc867195de8d8158b46b9f942bc1aea0 Mon Sep 17 00:00:00 2001 From: nite07 Date: Tue, 19 Mar 2024 22:27:52 +0800 Subject: [PATCH] update: goreleaser --- .github/workflows/goreleaser.yaml | 2 +- .goreleaser.pre.yaml | 34 +++++++++++++++++++++++++++++++ .goreleaser.yaml | 4 ++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .goreleaser.pre.yaml diff --git a/.github/workflows/goreleaser.yaml b/.github/workflows/goreleaser.yaml index 1f97cec..64a16c2 100644 --- a/.github/workflows/goreleaser.yaml +++ b/.github/workflows/goreleaser.yaml @@ -26,6 +26,6 @@ jobs: with: distribution: goreleaser version: latest - args: release --rm-dist --clean + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.pre.yaml b/.goreleaser.pre.yaml new file mode 100644 index 0000000..976e761 --- /dev/null +++ b/.goreleaser.pre.yaml @@ -0,0 +1,34 @@ +project_name: sub2sing-box +builds: + - env: + - CGO_ENABLED=0 + goos: + - windows + - linux + - darwin + goarch: + - amd64 + - arm64 + - arm + - "386" + ldflags: + - -s -w -X sub2sing-box/main.Version={{ .Version }} + flags: + - -trimpath + no_unique_dist_dir: true +archives: + - format: tar.gz + format_overrides: + - format: zip + goos: windows + wrap_in_directory: true + files: + - LICENSE + - README.md + - templates +release: + prerelease: auto + draft: true + github: + owner: nitezs + name: sub2sing-box diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 2aea47c..e18e55d 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -26,3 +26,7 @@ archives: - LICENSE - README.md - templates +release: + github: + owner: nitezs + name: sub2sing-box