diff --git a/.github/workflows/publish-node.js.yml b/.github/workflows/publish-node.js.yml index e68a319..9fcfec8 100644 --- a/.github/workflows/publish-node.js.yml +++ b/.github/workflows/publish-node.js.yml @@ -13,15 +13,19 @@ jobs: steps: - uses: actions/checkout@v2 + with: + ref: ${{ github.event.release.target_commitish }} - uses: actions/setup-node@v2 with: node-version: 16 cache: 'npm' + - run: git config --global user.name "GitHub CD bot" + - run: git config --global user.email "github-cd-bot@example.com" - run: npm version ${{ github.event.release.tag_name }} - - run: npm publish - env: - # Use a token to publish to NPM. See below for how to set it up - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} + # push the version changes to GitHub - run: git push env: