diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9010fb42da..96608a9149 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,12 +32,17 @@ jobs: NAME: clash BINDIR: bin run: | - make build_dep make -j releases + - name: Upload Artifact + uses: actions/upload-artifact@v4 + if: ${{ ! startsWith(github.ref, 'refs/tags/') }} + with: + path: build/releases/* + - name: Upload Release uses: softprops/action-gh-release@v2 - if: startsWith(github.ref, 'refs/tags/') + if: ${{ startsWith(github.ref, 'refs/tags/') }} with: files: build/releases/* draft: false diff --git a/Makefile b/Makefile index 9101d47015..2677f85504 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ NAME=clash-core BUILDDIR=build/releases VERSION=$(shell git describe --tags || echo v0.0.0-test) BUILDTIME=$(shell date -u) -GOBUILD=CGO_ENABLED=0 go generate && go build -trimpath -ldflags '-X "github.com/Dreamacro/clash/constant.Version=$(VERSION)" \ +GOBUILD=CGO_ENABLED=0 go build -trimpath -ldflags '-X "github.com/Dreamacro/clash/constant.Version=$(VERSION)" \ -X "github.com/Dreamacro/clash/constant.BuildTime=$(BUILDTIME)" \ -w -s -buildid=' @@ -25,9 +25,6 @@ WINDOWS_ARCH_LIST = \ windows-arm64 \ windows-armv7 -build_dep: - go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@latest - all: linux-amd64 windows-amd64 # Most used linux-386: diff --git a/main.go b/main.go index 25eba7a0d4..3adfe3d42c 100644 --- a/main.go +++ b/main.go @@ -1,4 +1,3 @@ -//go:generate goversioninfo package main import ( diff --git a/resource/goversioninfo.exe.manifest b/resource/goversioninfo.exe.manifest deleted file mode 100644 index 9cd80bb532..0000000000 --- a/resource/goversioninfo.exe.manifest +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/versioninfo.json b/versioninfo.json deleted file mode 100644 index 1869c9bcb1..0000000000 --- a/versioninfo.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "FixedFileInfo": { - "FileVersion": { - "Major": 1, - "Minor": 0, - "Patch": 0, - "Build": 0 - }, - "ProductVersion": { - "Major": 0, - "Minor": 0, - "Patch": 0, - "Build": 0 - }, - "FileFlagsMask": "3f", - "FileFlags ": "00", - "FileOS": "040004", - "FileType": "01", - "FileSubType": "00" - }, - "StringFileInfo": { - "Comments": "", - "CompanyName": "", - "FileDescription": "Clash Core", - "FileVersion": "1.0.0.0", - "InternalName": "", - "LegalCopyright": "", - "LegalTrademarks": "", - "OriginalFilename": "", - "PrivateBuild": "", - "ProductName": "Clash Components", - "ProductVersion": "0.0.0.0", - "SpecialBuild": "" - }, - "VarFileInfo": { - "Translation": { - "LangID": "0000", - "CharsetID": "04B0" - } - }, - "IconPath": "", - "ManifestPath": "resource/goversioninfo.exe.manifest" -}