From bcdb6011d58bb15499e00f0869cce53567ef16e3 Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Fri, 15 Oct 2021 16:42:16 -0400 Subject: [PATCH] tools: update setup-node to use cache (#70) --- .github/workflows/bump-version.yml | 7 ++++--- .github/workflows/create-release.yml | 5 +++-- .github/workflows/nodejs.yml | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index a4bae7e..bc44012 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -32,10 +32,11 @@ jobs: with: ssh-key: ${{ secrets.DEPLOY_KEY }} - - name: Setup Node.js 14 - uses: actions/setup-node@v1 + - name: Setup Node.js + uses: actions/setup-node@v2 with: - node-version: 14.x + node-version: '16' + cache: 'npm' - name: Install npm packages run: npm ci diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 1f4f3fe..bb5e155 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -11,9 +11,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2 with: - node-version: 16 + node-version: '16' + cache: 'npm' - name: Publish run: | npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index c3e466b..3153112 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -11,7 +11,7 @@ jobs: run-tests: strategy: matrix: - node-version: [16.x, 14.x, 12.x] + node-version: ['16', '14', '12'] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} @@ -20,9 +20,10 @@ jobs: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} + cache: 'npm' - name: Get npm cache directory if: matrix.os != 'windows-latest'