update workflow

This commit is contained in:
yuzuki999 2022-11-02 14:36:18 +08:00
parent 748d5afc90
commit 14f029baf6
2 changed files with 23 additions and 15 deletions

View File

@ -115,17 +115,25 @@ jobs:
- name: Get project dependencies
run: go mod download
- name: Get release version
if: ${{ github.event_name == 'release' }}
run: |
echo "version=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_ENV
- name: Get other version
if: ${{ github.event_name != 'release' }}
run: |
echo "version:${{ github.sha }}" >> $GITHUB_ENV
- name: Build V2bX
run: |
echo "version: $version"
mkdir -p build_assets
go build -v -o build_assets/V2bX -trimpath -ldflags "-s -w -buildid="
go build -v -o build_assets/V2bX -trimpath -ldflags "-X 'main.version=$version' -s -w -buildid="
- name: Build Mips softfloat V2bX
if: matrix.goarch == 'mips' || matrix.goarch == 'mipsle'
run: |
GOMIPS=softfloat go build -v -o build_assets/V2bX_softfloat -trimpath -ldflags "-s -w -buildid="
echo "version: $version"
GOMIPS=softfloat go build -v -o build_assets/V2bX_softfloat -trimpath -ldflags "-X 'main.version=$version' -s -w -buildid="
- name: Rename Windows V2bX
if: matrix.goos == 'windows'
run: |

View File

@ -20,7 +20,7 @@ var (
)
var (
version = "v0.0.7_beta2"
version = "TempVersion" //use ldflags replace
codename = "V2bX"
intro = "A V2board backend based on Xray-core"
)