Skip to content

Commit

Permalink
ci(actions): update github action to call npm publish, add npmrc foll…
Browse files Browse the repository at this point in the history
…owing github and npm docs

Fixes #536
  • Loading branch information
jwu910 committed Jan 27, 2024
1 parent 881fa30 commit cd07c64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ jobs:
with:
node-version: "16"
registry-url: https://registry.npmjs.org/
- run: npm ci
- uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}

- if: ${{ steps.publish.outputs.type }}
run: echo "Package upgraded from ${{ steps.publish.outputs.old-version }} to ${{ steps.publish.outputs.version }}!"
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
registry=https://registry.npmjs.org/
always-auth=true

0 comments on commit cd07c64

Please sign in to comment.