fix windows artefact type for testing

This commit is contained in:
ryan 2021-04-08 20:49:44 +12:00
parent 122a5fbdc3
commit 612d19d0fb

View file

@ -118,12 +118,15 @@ jobs:
- target: x86_64-unknown-linux-gnu - target: x86_64-unknown-linux-gnu
os: ubuntu-latest os: ubuntu-latest
output: cargo-binstall output: cargo-binstall
archive: tgz
- target: x86_64-apple-darwin - target: x86_64-apple-darwin
os: macos-latest os: macos-latest
output: cargo-binstall output: cargo-binstall
archive: tgz
- target: x86_64-pc-windows-msvc - target: x86_64-pc-windows-msvc
os: windows-latest os: windows-latest
output: cargo-binstall.exe output: cargo-binstall.exe
archive: zip
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -131,10 +134,15 @@ jobs:
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
with: with:
name: cargo-binstall-${{ matrix.target }}.tgz name: cargo-binstall-${{ matrix.target }}.${{ matrix.archive }}
- name: "Extract build artifact" - name: "Extract build artifact (tgz)"
if: ${{ matrix.target != 'x86_64-pc-windows-msvc' }}
run: tar -xvf cargo-binstall-${{ matrix.target }}.tgz run: tar -xvf cargo-binstall-${{ matrix.target }}.tgz
- name: "Extract build artifact (zip)"
if: ${{ matrix.target == 'x86_64-pc-windows-msvc' }}
run: tar.exe -xvf cargo-binstall-${{ matrix.target }}.zip
- name: "Run binstall" - name: "Run binstall"
run: ./${{ matrix.output }} cargo-binstall --manifest-path . --no-confirm run: ./${{ matrix.output }} cargo-binstall --manifest-path . --no-confirm