add npm-publish workflow

This commit is contained in:
tabcat 2021-09-29 20:40:21 -05:00
parent 0e8ed1ad95
commit 24dfadbc0c

22
.github/workflows/npm-publish.yml vendored Normal file
View File

@ -0,0 +1,22 @@
---
name: Node.js Package
on:
push:
tags:
- 'v*'
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 'lts/*'
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm test
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}