Skip to content

Commit 7f53c1a

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

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,19 @@ 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+
152160
- name: 🚀 Publish to NPM registry (npmjs)
153161
if: ${{ github.event.inputs.skipPublish != 'true' }}
154162
run: npm run publish -- --yes
155163
env:
156-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
164+
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
157165

158166
- name: 📣 Add summary
159167
if: ${{ github.event.inputs.skipPublish != 'true' }}

0 commit comments

Comments
 (0)