feat(publish): automatically publish to npm registry when codes merged to production branch
parent
5deafc5dbc
commit
d9858558cb
|
@ -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 }}
|
Loading…
Reference in New Issue