Skip to content

Commit 98d454a

Browse files
committed
ci: add config .npmrc step using NPM_TOKEN to allow npmjs publish
1 parent d1d83b5 commit 98d454a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,16 @@ jobs:
149149
echo "Generated CHANGELOG.md"
150150
cat CHANGELOG.md
151151
152+
- name: 🔧 Config .npmrc
153+
if: ${{ github.event.inputs.skipPublish != 'true' }}
154+
run: |
155+
{
156+
echo "registry=https://registry.npmjs.com"
157+
echo "//registry.npmjs.com/:_authToken=${NPM_TOKEN}"
158+
} > .npmrc
159+
env:
160+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
161+
152162
- name: 🚀 Publish to NPM registry (npmjs)
153163
if: ${{ github.event.inputs.skipPublish != 'true' }}
154164
run: npm run publish -- --yes

0 commit comments

Comments
 (0)