From a9ce3e5e03fcee38e1e38e9512ca8a504fb4b7a6 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Tue, 6 Aug 2024 21:16:03 -0400 Subject: [PATCH] ci: update ci to use cache from setup/node --- .github/workflows/publish.yml | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index de70edf7..bcef4434 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,26 +10,15 @@ 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 @@ -37,11 +26,6 @@ jobs: - 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