From ba7631964d44f14dedebd4c4ef57cd5563a8521a Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Sat, 3 Jul 2021 15:30:16 -0700 Subject: [PATCH] Only run install script on CI for non-releases (#895) --- .github/workflows/build.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e8f811e..9f27b14 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -123,8 +123,12 @@ jobs: sudo apt-get install ripgrep ./bin/forbid + - name: Prerelease Check + id: is_prerelease + run: cargo run --package prerelease -- --reference ${{ github.ref }} + - name: Test Install Script With Explicit Target - if: matrix.os != 'windows-2016' + if: matrix.os != 'windows-2016' && steps.is_prerelease.outputs.value run: | cd `mktemp -d` cat $GITHUB_WORKSPACE/docs/install.sh | bash -s -- --target ${{ matrix.target }} --to . @@ -133,7 +137,7 @@ jobs: fi - name: Test Install Script Without Explicit Target - if: matrix.os != 'windows-2016' + if: matrix.os != 'windows-2016' && steps.is_prerelease.outputs.value run: | cd `mktemp -d` cat $GITHUB_WORKSPACE/docs/install.sh | bash -s -- --to . @@ -145,10 +149,6 @@ jobs: run: ./bin/package ${{github.ref}} ${{matrix.os}} ${{ matrix.target }} shell: bash - - name: Prerelease Check - id: is_prerelease - run: cargo run --package prerelease -- --reference ${{ github.ref }} - - name: Publish uses: softprops/action-gh-release@v0.1.5 if: startsWith(github.ref, 'refs/tags/')