From 0563abae137eece4a61546173dc12aa505cf822a Mon Sep 17 00:00:00 2001 From: yaling888 <73897884+yaling888@users.noreply.github.com> Date: Fri, 3 Jun 2022 23:50:30 +0800 Subject: [PATCH] Chore: update build --- .github/workflows/release.yml | 36 +++++++++++++++++------------------ Makefile | 6 +++--- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 96b19d51..36413109 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,24 +38,24 @@ jobs: go test ./... - name: Build - #if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') env: NAME: clash BINDIR: bin run: make -j releases - - name: Prepare upload - run: | - echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV - echo "FILE_SHA=$(git describe --tags --always 2>/dev/null)" >> $GITHUB_ENV - - - name: Upload files to Artifacts - uses: actions/upload-artifact@v2 - if: startsWith(github.ref, 'refs/tags/') == false - with: - name: clash_${{ env.FILE_SHA }}${{ env.FILE_DATE }} - path: | - bin/* + #- name: Prepare upload + # run: | + # echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV + # echo "FILE_SHA=$(git describe --tags --always 2>/dev/null)" >> $GITHUB_ENV + # + #- name: Upload files to Artifacts + # uses: actions/upload-artifact@v2 + # if: startsWith(github.ref, 'refs/tags/') == false + # with: + # name: clash_${{ env.FILE_SHA }}${{ env.FILE_DATE }} + # path: | + # bin/* - name: Upload Release uses: softprops/action-gh-release@v1 @@ -66,8 +66,8 @@ jobs: prerelease: true generate_release_notes: true - - name: Delete workflow runs - uses: GitRML/delete-workflow-runs@main - with: - retain_days: 1 - keep_minimum_runs: 2 + #- name: Delete workflow runs + # uses: GitRML/delete-workflow-runs@main + # with: + # retain_days: 1 + # keep_minimum_runs: 2 diff --git a/Makefile b/Makefile index 824cc53e..4e4548d8 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ NAME=clash BINDIR=bin -VERSION=$(shell git describe --tags --always 2>/dev/null || date +%F) +VERSION=$(shell git describe --tags --always 2>/dev/null || echo "unknown version") BUILDTIME=$(shell date -u) GOBUILD=CGO_ENABLED=0 go build -trimpath -ldflags '-X "github.com/Dreamacro/clash/constant.Version=$(VERSION)" \ -X "github.com/Dreamacro/clash/constant.BuildTime=$(BUILDTIME)" \ @@ -16,7 +16,7 @@ PLATFORM_LIST = \ linux-armv5 \ linux-armv6 \ linux-armv7 \ - linux-arm64 \ + linux-armv8 \ linux-mips-softfloat \ linux-mips-hardfloat \ linux-mipsle-softfloat \ @@ -67,7 +67,7 @@ linux-armv6: linux-armv7: GOARCH=arm GOOS=linux GOARM=7 $(GOBUILD) -o $(BINDIR)/$(NAME)-$@ -linux-arm64: +linux-armv8: GOARCH=arm64 GOOS=linux $(GOBUILD) -o $(BINDIR)/$(NAME)-$@ linux-mips-softfloat: