add npm-publish

This commit is contained in:
xaoxuu 2021-02-20 00:02:41 +08:00
parent 98397bfe89
commit c571b19b0f
1 changed files with 25 additions and 0 deletions

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

@ -0,0 +1,25 @@
name: npm-publish
on:
push:
branches:
- main
jobs:
npm-publish:
name: npm-publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Set up Node.js
uses: actions/setup-node@master
with:
node-version: 10.0.0
- name: Publish
uses: MHuiG/npm-publish-action@master
with:
tag_name: "%s"
tag_message: "%s"
commit_pattern: "^release\\:\ (.*)"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.npm_token }}