Merge pull request #499 from Milo123459/milo/use-better-cache

Use better caching action in github actions
This commit is contained in:
Tw93
2023-07-09 22:00:48 +08:00
committed by GitHub
3 changed files with 8 additions and 65 deletions

View File

@@ -99,17 +99,8 @@ jobs:
echo "install pake on local"
npm install pake-cli
- name: rust cache restore
uses: actions/cache/restore@v3
id: cache_store
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
node_modules/pake-cli/src-tauri/target/
key: ${{ inputs.platform }}-cargo-${{ hashFiles('node_modules/pake-cli/src-tauri/Cargo.lock') }}
- name: rust cache
uses: Swatinem/rust-cache@v2
- name: build with pake-cli
shell: pwsh
@@ -133,15 +124,4 @@ jobs:
name: output-${{ inputs.platform }}.zip
path: node_modules/pake-cli/output/*
retention-days: 3
- name: rust cache store
uses: actions/cache/save@v3
if: steps.cache_store.outputs.cache-hit != 'true'
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
node_modules/pake-cli/src-tauri/target/
key: ${{ inputs.platform }}-cargo-${{ hashFiles('node_modules/pake-cli/src-tauri/Cargo.lock') }}

View File

@@ -49,16 +49,8 @@ jobs:
packages: libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev gnome-video-effects gnome-video-effects-extra
version: 1.1
- name: rust cache restore
uses: actions/cache/restore@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: rust cache
uses: Swatinem/rust-cache@v2
- name: build for Ubuntu
if: matrix.os == 'ubuntu-20.04'
@@ -75,11 +67,3 @@ jobs:
shell: pwsh
run: |
npm run build:all-windows
- name: Upload files
# arg info: https://github.com/ncipollo/release-action#release-action
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "output/*/*.*"
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -60,17 +60,8 @@ jobs:
packages: libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev gnome-video-effects gnome-video-effects-extra
version: 1.1
- name: rust cache restore
uses: actions/cache/restore@v3
id: cache_store
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: rust cache
uses: Swatinem/rust-cache@v2
- name: build for Ubuntu
if: matrix.os == 'ubuntu-20.04'
@@ -96,16 +87,4 @@ jobs:
prerelease: ${{ inputs.is_pre_release }}
artifacts: "output/*/*.*"
tag: ${{ inputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: rust cache store
uses: actions/cache/save@v3
if: steps.cache_store.outputs.cache-hit != 'true'
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
token: ${{ secrets.GITHUB_TOKEN }}