chore: auto publish by github action

This commit is contained in:
DIYgod
2020-07-10 11:39:51 +08:00
parent 328aa54f13
commit 4e829434ff
3 changed files with 31 additions and 2 deletions
+30
View File
@@ -0,0 +1,30 @@
name: test
on:
schedule:
- cron: '33 22 */3 * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12'
registry-url: 'https://registry.npmjs.org'
- name: Release
run: npx version-from-git --allow-same-version
- name: Publish to npmjs
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/setup-node@v1
with:
registry-url: 'https://npm.pkg.github.com'
- name: Publish to GPR
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-1
View File
@@ -20,7 +20,6 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}