Browse Source

ci: speed up cargo install by enabling cache (webview2) (#1283)

Sukka 11 months ago
parent
commit
c91ad1e016
2 changed files with 12 additions and 2 deletions
  1. 7 1
      .github/workflows/alpha.yml
  2. 5 1
      .github/workflows/release.yml

+ 7 - 1
.github/workflows/alpha.yml

@@ -171,9 +171,15 @@ jobs:
         uses: Swatinem/rust-cache@v2
         with:
           workspaces: src-tauri
+          cache-all-crates: true
+          cache-on-failure: true
 
       - name: Install Tauri CLI
-        run: cargo install --git https://github.com/tauri-apps/tauri --branch 1.x tauri-cli
+        uses: baptiste0928/cargo-install@v3
+        with:
+          crate: tauri-cli
+          git: https://github.com/tauri-apps/tauri
+          branch: 1.x # `branch` and `commit` are also supported
 
       - name: Install Node
         uses: actions/setup-node@v4

+ 5 - 1
.github/workflows/release.yml

@@ -161,7 +161,11 @@ jobs:
           workspaces: src-tauri
 
       - name: Install Tauri CLI
-        run: cargo install --git https://github.com/tauri-apps/tauri --branch 1.x tauri-cli
+        uses: baptiste0928/cargo-install@v3
+        with:
+          crate: tauri-cli
+          git: https://github.com/tauri-apps/tauri
+          branch: 1.x # `branch` and `commit` are also supported
 
       - name: Install Node
         uses: actions/setup-node@v4