Skip to content

Commit 8c1e809

Browse files
committed
chore: migrate publish workflow to yarn3
1 parent 3e3534a commit 8c1e809

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/publish.yml

+11-5
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,32 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v3
1414

15+
- name: Enable Corepack
16+
run: corepack enable
17+
1518
- name: Setup node
1619
uses: actions/setup-node@v3
1720
with:
1821
node-version: 18
19-
cache: 'npm'
22+
cache: 'yarn'
23+
cache-dependency-path: '**/yarn.lock'
2024
registry-url: 'https://registry.npmjs.org'
2125

22-
- name: NPM Install
23-
run: npm ci
26+
- name: Yarn Install
27+
run: yarn install --immutable
2428

2529
- name: Publish (NPM)
26-
run: npm publish --access public
30+
run: yarn npm publish --access public
2731
env:
2832
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2933

3034
- uses: actions/setup-node@v3
3135
with:
3236
registry-url: 'https://npm.pkg.github.com'
37+
cache: 'yarn'
38+
cache-dependency-path: '**/yarn.lock'
3339

3440
- name: Publish (GPR)
35-
run: npm publish
41+
run: yarn npm publish
3642
env:
3743
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)