ci: add Github Actions

This commit is contained in:
unix
2020-03-19 02:04:41 +08:00
parent d14032c437
commit 8d3b09d779
7 changed files with 112 additions and 0 deletions

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

@@ -0,0 +1,41 @@
name: Publish
on:
release:
types:
- published
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: checkout
uses: actions/setup-node@v1
with:
node-version: 12
- name: install
run: yarn install --check-files --frozen-lockfile
- name: lint
run: yarn lint
- name: build
run: yarn build
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: checkout
uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: install
run: yarn install --check-files --frozen-lockfile
- name: publish
run: yarn release
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}