Skip to content

Commit ac31bba

Browse files
committed
Updated publish workflow.
1 parent d4f3214 commit ac31bba

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/publish.workflow.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install Node.js
1717
uses: actions/setup-node@v4
1818
with:
19-
node-version: 18
19+
node-version: 20
2020
registry-url: 'https://registry.npmjs.org'
2121

2222
- name: Update NPM to latest
@@ -33,12 +33,13 @@ jobs:
3333
- name: Build package
3434
run: npm run build
3535

36+
- name: Create .npmrc
37+
run: |
38+
echo "registry=https://registry.npmjs.org/" > .npmrc
39+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" >> .npmrc
40+
3641
- name: NPM whoami
3742
run: npm whoami
38-
env:
39-
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
4043

4144
- name: Publish package
4245
run: npm publish
43-
env:
44-
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

0 commit comments

Comments
 (0)