Ensure cache is valid: wtf actions/cache#403

This commit is contained in:
lights0123 2021-04-05 17:49:51 -04:00
parent a07d785ca1
commit 4c0b2277c6
No known key found for this signature in database
GPG key ID: 28F315322E37972F
2 changed files with 12 additions and 10 deletions

View file

@ -16,6 +16,11 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Install GNU tar
if: runner.os == 'macOS'
run: |
brew install gnu-tar
echo "::add-path::/usr/local/opt/gnu-tar/libexec/gnubin"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
@ -34,7 +39,7 @@ jobs:
~/.cargo/git
~/.cargo/bin
desktop/src-tauri/target
key: ${{ matrix.platform }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ matrix.platform }}-cargo-v2-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.platform }}-cargo-
- name: setup node
@ -59,10 +64,6 @@ jobs:
sudo apt-get install -y webkit2gtk-4.0 squashfs-tools
- name: install app dependencies
run: yarn
- name: ensure cache is valid
if: runner.os != 'Windows'
run: cargo build --release || rm -rf desktop/src-tauri/target
working-directory: ./desktop/src-tauri
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -13,6 +13,11 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install GNU tar
if: runner.os == 'macOS'
run: |
brew install gnu-tar
echo "::add-path::/usr/local/opt/gnu-tar/libexec/gnubin"
- name: setup node
uses: actions/setup-node@v1
with:
@ -58,7 +63,7 @@ jobs:
~/.cargo/git
~/.cargo/bin
desktop/src-tauri/target
key: ${{ matrix.platform }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ matrix.platform }}-cargo-v2-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.platform }}-cargo-
- name: setup node
@ -83,10 +88,6 @@ jobs:
sudo apt-get install -y webkit2gtk-4.0 squashfs-tools
- name: install app dependencies
run: yarn
- name: ensure cache is valid
if: runner.os != 'Windows'
run: cargo build --release || rm -rf desktop/src-tauri/target
working-directory: ./desktop/src-tauri
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}