Only run install script on CI for non-releases (#895)

This commit is contained in:
Casey Rodarmor 2021-07-03 15:30:16 -07:00 committed by GitHub
parent 6272151551
commit ba7631964d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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/')