diff --git a/.github/workflows/linux-packages.yml b/.github/workflows/linux-packages.yml index 7a83d8be..ace350a7 100644 --- a/.github/workflows/linux-packages.yml +++ b/.github/workflows/linux-packages.yml @@ -71,10 +71,13 @@ jobs: sudo apt-get update sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libxdo-dev pkg-config unzip xdg-utils + # `workspaces`: rust-cache v2 has no `workdir` input, and with it the + # cache would look for Cargo.toml at the repository root and save nothing. - name: Rust cache uses: swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 #v2.9.2 with: - workdir: ./src-tauri + workspaces: "src-tauri -> target" + save-if: ${{ github.ref == 'refs/heads/main' }} - name: Install frontend dependencies run: pnpm install --frozen-lockfile