Merge pull request #499 from Milo123459/milo/use-better-cache
Use better caching action in github actions
This commit is contained in:
26
.github/workflows/pake-cli.yaml
vendored
26
.github/workflows/pake-cli.yaml
vendored
@@ -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') }}
|
||||
|
||||
20
.github/workflows/pake_build.yaml
vendored
20
.github/workflows/pake_build.yaml
vendored
@@ -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 }}
|
||||
|
||||
27
.github/workflows/pake_build_with_cache.yaml
vendored
27
.github/workflows/pake_build_with_cache.yaml
vendored
@@ -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 }}
|
||||
Reference in New Issue
Block a user