This commit is contained in:
johlanse 2022-08-21 16:32:30 +08:00
parent 4e5bbe2e4a
commit aa875f86b9
1 changed files with 1 additions and 2 deletions

View File

@ -51,11 +51,10 @@ jobs:
IS_PR: ${{ !!github.head_ref }} IS_PR: ${{ !!github.head_ref }}
CGO_ENABLED: 0 CGO_ENABLED: 0
run: | run: |
echo ${steps.snapshot.outputs.ARG}
if [ $GOOS = "windows" ]; then export BINARY_SUFFIX="$BINARY_SUFFIX.exe"; fi if [ $GOOS = "windows" ]; then export BINARY_SUFFIX="$BINARY_SUFFIX.exe"; fi
if $IS_PR ; then echo $PR_PROMPT; fi if $IS_PR ; then echo $PR_PROMPT; fi
export BINARY_NAME="$BINARY_PREFIX$GOOS_$GOARCH$BINARY_SUFFIX" export BINARY_NAME="$BINARY_PREFIX$GOOS_$GOARCH$BINARY_SUFFIX"
export LD_FLAGS="-w -s -X main.VERSION=${steps.snapshot.outputs.ARG}" export LD_FLAGS="-w -s -X main.VERSION=${{steps.snapshot.outputs.ARG}}"
go mod tidy go mod tidy
go build -o "output/$BINARY_NAME" -trimpath -ldflags "$LD_FLAGS" ./ go build -o "output/$BINARY_NAME" -trimpath -ldflags "$LD_FLAGS" ./
- name: Upload artifact - name: Upload artifact