From a776c5b5f616ee881c1d60bf8f12a990f55ec714 Mon Sep 17 00:00:00 2001 From: xishang0128 Date: Sat, 24 Feb 2024 03:38:24 +0800 Subject: [PATCH] 1 1 --- .github/workflows/build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef19447dd9..37e2ffedd5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,10 +51,15 @@ jobs: GOOS: ${{matrix.jobs.goos}} GOARCH: ${{matrix.jobs.goarch}} GOAMD64: ${{matrix.jobs.goamd64}} + output: ${{matrix.jobs.output}} CGO_ENABLED: '0' run: | go build -v -tags "with_gvisor" -trimpath -ldflags "-X 'github.com/metacubex/mihomo/constant.Version=${VERSION}' -X 'github.com/metacubex/mihomo/constant.BuildTime=${BUILDTIME}' -w -s -buildid=" - if [ "${GOOS}" = "windows" ]; then mv mihomo.exe mihomo-${GOOS}-${output}-${VERSION}.exe && zip -r mihomo-${GOOS}-${output}-${VERSION}.zip mihomo-${GOOS}-${output}-${VERSION}.exe; else mv mihomo* mihomo-${GOOS}-${output}-${VERSION} && tar -czvf mihomo-${GOOS}-${output}-${VERSION}.tar.gz mihomo-${GOOS}-${output}-${VERSION}; fi + if [ "${GOOS}" = "windows" ]; then + mv mihomo.exe mihomo-${GOOS}-${output}-${VERSION}.exe && zip -r mihomo-${GOOS}-${output}-${VERSION}.zip mihomo-${GOOS}-${output}-${VERSION}.exe + else + mv mihomo* mihomo-${GOOS}-${output}-${VERSION} && tar -czvf mihomo-${GOOS}-${output}-${VERSION}.tar.gz mihomo-${GOOS}-${output}-${VERSION} + fi ls - name: Archive production artifacts