feat(publish): automatically publish to npm registry when codes merged to production branch

pull/29/head
Minghe 2022-07-27 21:59:18 +08:00 committed by GitHub
parent 5deafc5dbc
commit d9858558cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 0 deletions

19
.github/workflows/publish.yml vendored 100644
View File

@ -0,0 +1,19 @@
name: publish
on:
push:
branches: [production]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
- run: yarn
- run: yarn build
- run: yarn test
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}