diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml deleted file mode 100644 index 80ef30d9..00000000 --- a/.github/actions/setup-node/action.yml +++ /dev/null @@ -1,18 +0,0 @@ -runs: - using: 'composite' - steps: - - uses: actions/setup-node@v2.1.2 - with: - node-version: '14' - - - run: echo "::set-output name=dir::$(yarn cache dir)" - - - uses: actions/cache@v2 - with: - path: | - ${{ steps.yarn-cache-dir-path.outputs.dir }} - ~/.npm - ~/cache - !~/cache/exclude - **/node_modules - key: npm-${{ runner.os }}-${{ hashFiles('yarn.lock') }} diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index b82cde78..ce27ce28 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -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] @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bea7a27b..ef1e25e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 输出的值作为下一环节的输入 @@ -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 }} diff --git a/.npmrc b/.npmrc index adc770fd..b785cec1 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1 @@ electron_mirror=https://cdn.npm.taobao.org/dist/electron/ -package-lock=false