mirror of
https://github.com/zhigang1992/react.git
synced 2026-03-26 06:55:07 +08:00
ci: add Github Actions
This commit is contained in:
41
.github/workflows/publish.yml
vendored
Normal file
41
.github/workflows/publish.yml
vendored
Normal 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}}
|
||||
Reference in New Issue
Block a user