Skip to content

Commit

Permalink
🐛 fix: 优化流程
Browse files Browse the repository at this point in the history
CI 流程优化
  • Loading branch information
arvinxx authored Feb 6, 2021
2 parents c383cb6 + d0c0943 commit 9b2303d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 36 deletions.
18 changes: 0 additions & 18 deletions .github/actions/setup-node/action.yml

This file was deleted.

9 changes: 6 additions & 3 deletions .github/workflows/cache.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Cache CI
name: Cache
on: [push]

jobs:
install:
name: Install and Cache Dependency
cache:
name: Cache yarn packages
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
Expand All @@ -17,9 +18,11 @@ jobs:

- name: Yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}

- name: Install
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
21 changes: 7 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

check:
needs: precheck
name: Release check
name: Code quality(ubuntu-latest) and Release check
runs-on: ubuntu-latest
outputs:
# 将 semantic 输出的值作为下一环节的输入
Expand Down Expand Up @@ -185,20 +185,13 @@ jobs:
- name: List artifact
run: ls -al release

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Yarn cache
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}

- name: Install
run: yarn
- run: yarn add -D conventional-changelog-gitmoji-config

- name: Release
run: yarn release
uses: cycjimmy/semantic-release-action@v2
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
electron_mirror=https://cdn.npm.taobao.org/dist/electron/
package-lock=false

0 comments on commit 9b2303d

Please sign in to comment.