Skip to content

Commit 18cd9d9

Browse files
authored
Update publish-node.js.yml
1 parent 89c33a3 commit 18cd9d9

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/publish-node.js.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@ jobs:
1717
with:
1818
node-version: 16
1919
cache: 'npm'
20-
- name: Set env
21-
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
22-
- name: Publish Package
23-
uses: JS-DevTools/npm-publish@v1
24-
with:
25-
token: ${{ secrets.NPM_TOKEN }}
26-
tag: ${{ env.RELEASE_VERSION }}
20+
- run: npm version ${{ github.event.release.tag_name }}
21+
- run: npm publish
22+
env:
23+
# Use a token to publish to NPM. See below for how to set it up
24+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
25+
# push the version changes to GitHub
26+
- run: git push
27+
env:
28+
# The secret is passed automatically. Nothing to configure.
29+
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)