chore: add github auto publish npm package
This commit is contained in:
parent
a2a7edb983
commit
2080f59c5c
|
@ -4,8 +4,10 @@
|
|||
name: Node.js Package
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
push:
|
||||
tags: [ v* ] # Push events to matching v*, i.e. v1.0, v20.15.10
|
||||
# release:
|
||||
# types: [created]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
@ -16,7 +18,7 @@ jobs:
|
|||
with:
|
||||
node-version: 20
|
||||
- run: npm ci
|
||||
- run: npm test
|
||||
- run: npm run build
|
||||
|
||||
publish-npm:
|
||||
needs: build
|
||||
|
@ -30,4 +32,4 @@ jobs:
|
|||
- run: npm ci
|
||||
- run: npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
||||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||
|
|
Loading…
Reference in New Issue