From cd07c643f19528749894b0a2f17dadfaf5679171 Mon Sep 17 00:00:00 2001 From: Joshua Wu Date: Thu, 13 Jul 2023 11:34:44 -0700 Subject: [PATCH] ci(actions): update github action to call npm publish, add npmrc following github and npm docs Fixes #536 --- .github/workflows/npmpublish.yml | 10 +++------- .npmrc | 3 +++ 2 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 .npmrc diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index 68a5526..77b96ea 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -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}} diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..ababd7a --- /dev/null +++ b/.npmrc @@ -0,0 +1,3 @@ +//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} +registry=https://registry.npmjs.org/ +always-auth=true