Commit ff09c0da authored by 混淆's avatar 混淆 Committed by GitHub

Fix artifact uploads are disabled unconditionally

parent d3f91c11
...@@ -6,7 +6,6 @@ env: ...@@ -6,7 +6,6 @@ env:
BINARY_PREFIX: "go-cqhttp_" BINARY_PREFIX: "go-cqhttp_"
BINARY_SUFFIX: "" BINARY_SUFFIX: ""
PR_PROMPT: "::warning:: Build artifact will not be uploaded due to the workflow is trigged by pull request." PR_PROMPT: "::warning:: Build artifact will not be uploaded due to the workflow is trigged by pull request."
IS_PR: ${{ !!github.head_ref }}
LD_FLAGS: "-w -s" LD_FLAGS: "-w -s"
jobs: jobs:
...@@ -35,6 +34,7 @@ jobs: ...@@ -35,6 +34,7 @@ jobs:
env: env:
GOOS: ${{ matrix.goos }} GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }} GOARCH: ${{ matrix.goarch }}
IS_PR: ${{ !!github.head_ref }}
run: | run: |
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
...@@ -43,7 +43,7 @@ jobs: ...@@ -43,7 +43,7 @@ jobs:
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
if: ${{ !env.IS_PR }} if: ${{ !!github.head_ref }}
with: with:
name: ${{ matrix.goos }}_${{ matrix.goarch }} name: ${{ matrix.goos }}_${{ matrix.goarch }}
path: output/ path: output/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment