1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 19:17:37 +08:00

ci: fix version path

This commit is contained in:
wdvxdr 2021-12-08 22:52:37 +08:00
parent 8ba93cbf7c
commit a9c1f2e5f3
No known key found for this signature in database
GPG Key ID: 703F8C071DE7A1B6

View File

@ -46,7 +46,8 @@ jobs:
if $IS_PR ; then echo $PR_PROMPT; fi
export BINARY_NAME="$BINARY_PREFIX$GOOS_$GOARCH$BINARY_SUFFIX"
export CGO_ENABLED=0
go build -o "output/$BINARY_NAME" -trimpath -ldflags "-w -s -X main.version=${COMMIT_ID::7}" .
export LD_FLAGS="-w -s -X github.com/Mrs4s/go-cqhttp/internal/base.Version=${COMMIT_ID::7}"
go build -o "output/$BINARY_NAME" -trimpath -ldflags "$LD_FLAGS" .
- name: Upload artifact
uses: actions/upload-artifact@v2
if: ${{ !github.head_ref }}