Chore: update build
This commit is contained in:
parent
3dbba5d8d2
commit
0563abae13
36
.github/workflows/release.yml
vendored
36
.github/workflows/release.yml
vendored
@ -38,24 +38,24 @@ jobs:
|
|||||||
go test ./...
|
go test ./...
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
#if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
env:
|
env:
|
||||||
NAME: clash
|
NAME: clash
|
||||||
BINDIR: bin
|
BINDIR: bin
|
||||||
run: make -j releases
|
run: make -j releases
|
||||||
|
|
||||||
- name: Prepare upload
|
#- name: Prepare upload
|
||||||
run: |
|
# run: |
|
||||||
echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV
|
# echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV
|
||||||
echo "FILE_SHA=$(git describe --tags --always 2>/dev/null)" >> $GITHUB_ENV
|
# echo "FILE_SHA=$(git describe --tags --always 2>/dev/null)" >> $GITHUB_ENV
|
||||||
|
#
|
||||||
- name: Upload files to Artifacts
|
#- name: Upload files to Artifacts
|
||||||
uses: actions/upload-artifact@v2
|
# uses: actions/upload-artifact@v2
|
||||||
if: startsWith(github.ref, 'refs/tags/') == false
|
# if: startsWith(github.ref, 'refs/tags/') == false
|
||||||
with:
|
# with:
|
||||||
name: clash_${{ env.FILE_SHA }}${{ env.FILE_DATE }}
|
# name: clash_${{ env.FILE_SHA }}${{ env.FILE_DATE }}
|
||||||
path: |
|
# path: |
|
||||||
bin/*
|
# bin/*
|
||||||
|
|
||||||
- name: Upload Release
|
- name: Upload Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
@ -66,8 +66,8 @@ jobs:
|
|||||||
prerelease: true
|
prerelease: true
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
|
|
||||||
- name: Delete workflow runs
|
#- name: Delete workflow runs
|
||||||
uses: GitRML/delete-workflow-runs@main
|
# uses: GitRML/delete-workflow-runs@main
|
||||||
with:
|
# with:
|
||||||
retain_days: 1
|
# retain_days: 1
|
||||||
keep_minimum_runs: 2
|
# keep_minimum_runs: 2
|
||||||
|
6
Makefile
6
Makefile
@ -1,6 +1,6 @@
|
|||||||
NAME=clash
|
NAME=clash
|
||||||
BINDIR=bin
|
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)
|
BUILDTIME=$(shell date -u)
|
||||||
GOBUILD=CGO_ENABLED=0 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)" \
|
-X "github.com/Dreamacro/clash/constant.BuildTime=$(BUILDTIME)" \
|
||||||
@ -16,7 +16,7 @@ PLATFORM_LIST = \
|
|||||||
linux-armv5 \
|
linux-armv5 \
|
||||||
linux-armv6 \
|
linux-armv6 \
|
||||||
linux-armv7 \
|
linux-armv7 \
|
||||||
linux-arm64 \
|
linux-armv8 \
|
||||||
linux-mips-softfloat \
|
linux-mips-softfloat \
|
||||||
linux-mips-hardfloat \
|
linux-mips-hardfloat \
|
||||||
linux-mipsle-softfloat \
|
linux-mipsle-softfloat \
|
||||||
@ -67,7 +67,7 @@ linux-armv6:
|
|||||||
linux-armv7:
|
linux-armv7:
|
||||||
GOARCH=arm GOOS=linux GOARM=7 $(GOBUILD) -o $(BINDIR)/$(NAME)-$@
|
GOARCH=arm GOOS=linux GOARM=7 $(GOBUILD) -o $(BINDIR)/$(NAME)-$@
|
||||||
|
|
||||||
linux-arm64:
|
linux-armv8:
|
||||||
GOARCH=arm64 GOOS=linux $(GOBUILD) -o $(BINDIR)/$(NAME)-$@
|
GOARCH=arm64 GOOS=linux $(GOBUILD) -o $(BINDIR)/$(NAME)-$@
|
||||||
|
|
||||||
linux-mips-softfloat:
|
linux-mips-softfloat:
|
||||||
|
Reference in New Issue
Block a user