Skip to content

Commit 32d78d6

Browse files
committed
ci: tweak GH workflow
1 parent 0a58d59 commit 32d78d6

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/npm-publish.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
33

4-
name: Node.js Package
4+
name: NPM Publish
55

66
on:
77
release:
@@ -26,8 +26,11 @@ jobs:
2626
- uses: actions/setup-node@v2
2727
with:
2828
node-version: 16
29-
registry-url: https://registry.npmjs.org/
3029
- run: npm ci
31-
- run: npm publish
32-
env:
33-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
30+
- id: publish
31+
uses: JS-DevTools/npm-publish@v1
32+
with:
33+
token: ${{ secrets.NPM_TOKEN }}
34+
- if: steps.publish.outputs.types != 'none'
35+
run: |
36+
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}"

0 commit comments

Comments
 (0)