disable actions cache on macos, fix path error on windows

This commit is contained in:
ryan 2020-12-14 21:27:53 +13:00
parent 6848f4dda9
commit dd4407bbb6

View file

@ -50,6 +50,8 @@ jobs:
- name: Configure caching - name: Configure caching
uses: actions/cache@v2 uses: actions/cache@v2
if: ${{ matrix.os != 'macos-latest' }}
# Caching disabled on macos due to https://github.com/actions/cache/issues/403
with: with:
key: ${{ matrix.os }}-${{ matrix.target }} key: ${{ matrix.os }}-${{ matrix.target }}
path: | path: |
@ -77,8 +79,7 @@ jobs:
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
key: ${{ matrix.os }}-${{ matrix.target }} key: ${{ matrix.os }}-${{ matrix.target }}
path: $VCPKG_DIRECTORY path: C:/vcpkg/installed
- name: Build release - name: Build release
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
@ -88,14 +89,14 @@ jobs:
- name: Copy / Rename utility - name: Copy / Rename utility
run: | run: |
cp target/${{ matrix.target }}/release/${{ matrix.output }} cargo-binstall-${{ matrix.target }} cp target/${{ matrix.target }}/release/${{ matrix.output }} ${{ matrix.output }}
tar -czvf cargo-binstall-${{ matrix.target }}.tgz ${{ matrix.output }}-${{ matrix.target }} tar -czvf cargo-binstall-${{ matrix.target }}.tgz ${{ matrix.output }}
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: cargo-binstall-${{ matrix.target }} name: cargo-binstall-${{ matrix.target }}.tgz
path: cargo-binstall-${{ matrix.target }} path: cargo-binstall-${{ matrix.target }}.tgz
- name: Upload binary to release - name: Upload binary to release
if: ${{ startsWith(github.ref, 'refs/tags/v') }} if: ${{ startsWith(github.ref, 'refs/tags/v') }}