增加release 分支缓存

This commit is contained in:
Tlntin
2023-01-08 17:11:19 +08:00
parent bdb87d1ba0
commit 26bcd862c0
2 changed files with 128 additions and 42 deletions

View File

@@ -1,9 +1,9 @@
name: Build App
name: Build App with Cache
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "V*"
branches:
- release
jobs:
build:
@@ -47,37 +47,12 @@ jobs:
override: true
target: ${{ matrix.target }}
- name: "Cache Restore"
uses: Swatinem/rust-cache@v2
with:
prefix-key: ""
shared-key: ""
key: ""
env-vars: ""
workspaces: "src-tauri"
cache-directories: ""
cache-targets: ""
cache-on-failure: ""
save-if: "false"
# for more to see: https://github.com/Swatinem/rust-cache
- name: install dependencies (ubuntu only)
if: matrix.os == 'ubuntu-20.04'
uses: awalsh128/cache-apt-pkgs-action@latest
with:
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: ylemkimon/cache-restore@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: build for Ubuntu
if: matrix.os == 'ubuntu-20.04'
@@ -123,17 +98,3 @@ jobs:
# with:
# name: ${{ matrix.archive-name }}
# path: src-tauri/${{ matrix.archive-name }}
# - name: "Store cache"
# uses: Swatinem/rust-cache@v2
# with:
# prefix-key: ""
# shared-key: ""
# key: ""
# env-vars: ""
# workspaces: "src-tauri"
# cache-directories: ""
# cache-targets: ""
# cache-on-failure: ""
# save-if: ""
# for more to see: https://github.com/Swatinem/rust-cache