Skip to content

Commit 023bb2f

Browse files
authored
ci: update ci to use cache from setup/node (#217)
1 parent 9bb6a7e commit 023bb2f

File tree

1 file changed

+6
-22
lines changed

1 file changed

+6
-22
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,38 +10,22 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v4
13+
- uses: actions/checkout@v4
1514

16-
- name: Determine Yarn Cache Path
17-
id: yarn-cache-dir-path
18-
run: echo "::set-output name=dir::$(yarn cache dir)"
15+
- run: corepack enable
1916

20-
- uses: actions/cache@v4
21-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
17+
- uses: actions/setup-node@v4
2218
with:
23-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
24-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
25-
restore-keys: |
26-
${{ runner.os }}-yarn-
27-
28-
- name: Setup Node.js 18.x to publish to npmjs.org
29-
uses: actions/setup-node@v4
30-
with:
31-
node-version: "18.x"
32-
registry-url: "https://registry.npmjs.org"
19+
node-version: 22
20+
cache: yarn
21+
cache-dependency-path: "**/yarn.lock"
3322

3423
- name: Install Packages
3524
run: yarn install --frozen-lockfile
3625

3726
- name: Build
3827
run: yarn build
3928

40-
- name: Test
41-
run: yarn test --runInBand=false --maxWorkers=2 --workerIdleMemoryLimit=1700MB # https://github.com/facebook/jest/issues/11956
42-
env:
43-
CI: true
44-
4529
- name: Generate Release Body
4630
run: npx extract-changelog-release > RELEASE_BODY.md
4731

0 commit comments

Comments
 (0)