Skip to content

Commit 9e987fb

Browse files
committed
update
1 parent e1c4b1b commit 9e987fb

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

.github/workflows/node.js.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,15 @@ jobs:
4545
- run: npm install
4646
- run: npm run build
4747

48-
- name: Publish to npm dry-run
48+
- name: Authenticate with npm
4949
env:
50-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
51-
run: |
52-
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
53-
npm publish --dry-run
50+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
51+
run: echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc
52+
53+
- name: Run npm publish dry run
54+
run: npm run npm:publish:dry-run
5455

5556
- name: Publish to npm
56-
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
5757
env:
5858
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
59-
run: |
60-
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
61-
npm publish
59+
run: npm run npm:publish

0 commit comments

Comments
 (0)