Skip to content

Commit 0669f09

Browse files
committed
fix(ci): fix publish on npm workflow
1 parent 1c18dde commit 0669f09

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish package
1+
name: Publish package to npmjs
22

33
on:
44
release:
@@ -9,11 +9,21 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
12-
- uses: actions/setup-node@v4
12+
13+
- name: Set up Node.js
14+
uses: actions/setup-node@v4
1315
with:
14-
registry-url: 'https://registry.npmjs.org'
16+
node-version: 18
17+
registry-url: "https://registry.npmjs.org"
18+
cache: 'yarn'
19+
20+
- name: Prepare NPM credentials
21+
run: |
22+
echo "npmAuthToken: ${NODE_AUTH_TOKEN}" >> .yarnrc.yml
23+
env:
24+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
25+
1526
- run: yarn
27+
1628
- name: Publish to npm
17-
run: yarn publish
18-
env:
19-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
29+
run: yarn npm publish

0 commit comments

Comments
 (0)