diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d676aad4..4d731f33 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,6 +19,12 @@ jobs: uses: actions/setup-node@v5 with: node-version: lts/* + - name: cache npm + uses: actions/cache@v4 + with: + path: ~/.npm + key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} + restore-keys: ${{ runner.os }}-npm- - name: get version id: get-version run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT @@ -94,10 +100,20 @@ jobs: uses: actions/setup-node@v5 with: node-version: lts/* + - name: cache npm + uses: actions/cache@v4 + with: + path: ~/.npm + key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} + restore-keys: ${{ runner.os }}-npm- - name: install Rust stable uses: dtolnay/rust-toolchain@stable with: targets: ${{ matrix.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} + - name: cache cargo + uses: Swatinem/rust-cache@v2 + with: + workspaces: src-tauri - name: install npm dependencies run: npm install - uses: tauri-apps/tauri-action@v0 @@ -147,9 +163,21 @@ jobs: with: node-version: lts/* + - name: cache npm + uses: actions/cache@v4 + with: + path: ~/.npm + key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} + restore-keys: ${{ runner.os }}-npm- + - name: install Rust stable uses: dtolnay/rust-toolchain@stable + - name: cache cargo + uses: Swatinem/rust-cache@v2 + with: + workspaces: src-tauri + - name: install npm dependencies run: npm install @@ -179,6 +207,12 @@ jobs: uses: actions/setup-node@v5 with: node-version: lts/* + - name: cache npm + uses: actions/cache@v4 + with: + path: ~/.npm + key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} + restore-keys: ${{ runner.os }}-npm- - name: generate latest.json env: VERSION: ${{ needs.create-release.outputs.package_version }}