From 8b625861ef0fe01e78c3e9de0dc12a5b427cbbc8 Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Mon, 26 Oct 2020 16:07:08 +0100 Subject: [PATCH] Add node modules cache, setup node 12 --- .github/workflows/build-release.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index fbc0600a46a4a..7fae5f16ff188 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -14,6 +14,24 @@ jobs: - name: Checkout code uses: actions/checkout@master + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Use Node.js 12.x + uses: actions/setup-node@v1 + with: + node-version: 12.x + - name: Build Gutenberg plugin ZIP file run: ./bin/build-plugin-zip.sh env: