Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
saadshams committed Sep 13, 2024
1 parent e1c4b1b commit 9e987fb
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,15 @@ jobs:
- run: npm install
- run: npm run build

- name: Publish to npm dry-run
- name: Authenticate with npm
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
npm publish --dry-run
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc

- name: Run npm publish dry run
run: npm run npm:publish:dry-run

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

0 comments on commit 9e987fb

Please sign in to comment.