feat: 增加 npm push github action

This commit is contained in:
Jerry
2021-01-12 23:38:33 +08:00
parent 7b2f32f30c
commit b2025a7dbe

19
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: npm publish
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}