Skip to content

Commit

Permalink
ci: update ci to use cache from setup/node
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpza committed Aug 7, 2024
1 parent 0faf586 commit a9ce3e5
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,22 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Determine Yarn Cache Path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- run: corepack enable

- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
- uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Setup Node.js 18.x to publish to npmjs.org
uses: actions/setup-node@v4
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
node-version: 22
cache: yarn
cache-dependency-path: "**/yarn.lock"

- name: Install Packages
run: yarn install --frozen-lockfile

- name: Build
run: yarn build

- name: Test
run: yarn test --runInBand=false --maxWorkers=2 --workerIdleMemoryLimit=1700MB # https://github.com/facebook/jest/issues/11956
env:
CI: true

- name: Generate Release Body
run: npx extract-changelog-release > RELEASE_BODY.md

Expand Down

0 comments on commit a9ce3e5

Please sign in to comment.