mirror of
https://github.com/wyx2685/V2bX.git
synced 2025-02-02 06:48:14 -05:00
update workflow
This commit is contained in:
parent
748d5afc90
commit
14f029baf6
28
.github/workflows/release.yml
vendored
28
.github/workflows/release.yml
vendored
@ -115,17 +115,25 @@ jobs:
|
|||||||
|
|
||||||
- name: Get project dependencies
|
- name: Get project dependencies
|
||||||
run: go mod download
|
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
|
- name: Build V2bX
|
||||||
run: |
|
run: |
|
||||||
|
echo "version: $version"
|
||||||
mkdir -p build_assets
|
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
|
- name: Build Mips softfloat V2bX
|
||||||
if: matrix.goarch == 'mips' || matrix.goarch == 'mipsle'
|
if: matrix.goarch == 'mips' || matrix.goarch == 'mipsle'
|
||||||
run: |
|
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
|
- name: Rename Windows V2bX
|
||||||
if: matrix.goos == 'windows'
|
if: matrix.goos == 'windows'
|
||||||
run: |
|
run: |
|
||||||
@ -169,12 +177,12 @@ jobs:
|
|||||||
- name: Change the name
|
- name: Change the name
|
||||||
run: |
|
run: |
|
||||||
mv build_assets V2bX-$ASSET_NAME
|
mv build_assets V2bX-$ASSET_NAME
|
||||||
# - name: Upload files to Artifacts
|
# - name: Upload files to Artifacts
|
||||||
# uses: actions/upload-artifact@v2
|
# uses: actions/upload-artifact@v2
|
||||||
# with:
|
# with:
|
||||||
# name: V2bX-${{ steps.get_filename.outputs.ASSET_NAME }}
|
# name: V2bX-${{ steps.get_filename.outputs.ASSET_NAME }}
|
||||||
# path: |
|
# path: |
|
||||||
# ./V2bX-${{ steps.get_filename.outputs.ASSET_NAME }}/*
|
# ./V2bX-${{ steps.get_filename.outputs.ASSET_NAME }}/*
|
||||||
- name: Upload binaries to release
|
- name: Upload binaries to release
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
|
Loading…
Reference in New Issue
Block a user