add caching

This commit is contained in:
Anton Bracke 2022-02-18 23:55:40 +01:00
parent 2c0cb2f62b
commit 389c2e4844
No known key found for this signature in database
GPG Key ID: B1222603899C6B25

View File

@ -9,6 +9,9 @@ on:
release: release:
types: [created] types: [created]
env:
YARN_CACHE_FOLDER: ~/.yarn
jobs: jobs:
build_on_linux: build_on_linux:
name: "Build & release desktop app for ${{ matrix.os }}" name: "Build & release desktop app for ${{ matrix.os }}"
@ -38,6 +41,17 @@ jobs:
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- name: Caching
uses: actions/cache@v2
with:
path: |
${{ env.YARN_CACHE_FOLDER }}
~/.cache/electron
~/.cache/electron-builder
key: ${{ runner.OS }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-
- name: "Install dependencies" - name: "Install dependencies"
run: yarn install --froze-lockfile run: yarn install --froze-lockfile
working-directory: "desktop" working-directory: "desktop"