Skip to content

Commit

Permalink
👷 ci: 优化发版 ci 流程
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Feb 5, 2021
1 parent afea89d commit 93835bd
Showing 1 changed file with 33 additions and 7 deletions.
40 changes: 33 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,39 @@ on:
- beta

jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v2

- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: '14'

- name: Cache multiple paths
uses: actions/cache@v2
with:
path: |
~/.npm
~/cache
!~/cache/exclude
**/node_modules
key: npm-${{ runner.os }}-${{ hashFiles('yarn.lock') }}

- name: Install
run: yarn

- name: lint
run: yarn lint

check:
name: Code quality check
needs: test
name: Release check
runs-on: ubuntu-latest
outputs:
# 将 semantic 输出的值作为下一环节的输入
Expand All @@ -31,19 +62,14 @@ jobs:
**/node_modules
key: npm-${{ runner.os }}-${{ hashFiles('yarn.lock') }}

- name: Install
run: yarn

- name: Lint
run: yarn lint

- name: Semantic Release with dryRun
uses: cycjimmy/semantic-release-action@v2
id: semantic
with:
dry_run: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build:
needs: check
name: Build
Expand Down

0 comments on commit 93835bd

Please sign in to comment.