From ff09c0da3eeabeeddd07db1aabb6be67d794c912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=B7=E6=B7=86?= <32300164+mnixry@users.noreply.github.com> Date: Mon, 3 Aug 2020 20:51:51 +0800 Subject: [PATCH] Fix artifact uploads are disabled unconditionally --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index faa2a8c..a05aa29 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,6 @@ env: BINARY_PREFIX: "go-cqhttp_" BINARY_SUFFIX: "" 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" jobs: @@ -35,6 +34,7 @@ jobs: env: GOOS: ${{ matrix.goos }} GOARCH: ${{ matrix.goarch }} + IS_PR: ${{ !!github.head_ref }} run: | if [ $GOOS = "windows" ]; then export BINARY_SUFFIX="$BINARY_SUFFIX.exe"; fi if $IS_PR ; then echo $PR_PROMPT; fi @@ -43,7 +43,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v2 - if: ${{ !env.IS_PR }} + if: ${{ !!github.head_ref }} with: name: ${{ matrix.goos }}_${{ matrix.goarch }} path: output/