mirror of
https://github.com/zhigang1992/react.git
synced 2026-02-06 22:44:08 +08:00
40 lines
890 B
YAML
40 lines
890 B
YAML
name: Publish
|
|
|
|
on:
|
|
release:
|
|
types: [created]
|
|
|
|
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: lint
|
|
run: yarn test
|
|
- 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}}
|