Skip to content

Commit

Permalink
yarn pnp cache config
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandra-c committed Jun 10, 2022
1 parent 0d8cd8e commit 1d2f4e6
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install Yarn
Expand All @@ -32,15 +32,30 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@master

- name: Setup Node.js 12.x
uses: actions/setup-node@v2
- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 12.x
node-version: 16.x

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
shell: bash

- uses: actions/cache@v3
id: yarn-cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn
run: yarn --frozen-lockfile
shell: bash

- name: Create Release Pull Request or Publish to npm
id: changesets
Expand Down

0 comments on commit 1d2f4e6

Please sign in to comment.