From 1b2e3b3e29d213c37b9c59822f2fee059500a0d5 Mon Sep 17 00:00:00 2001 From: arvinxx Date: Sat, 6 Feb 2021 10:44:52 +0800 Subject: [PATCH 1/7] =?UTF-8?q?:construction=5Fworker:=20ci:=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20Release=20=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cache.yml | 7 ++++--- .github/workflows/release.yml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index b82cde78..21c097a9 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] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bea7a27b..7f0aa005 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 and Release check runs-on: ubuntu-latest outputs: # 将 semantic 输出的值作为下一环节的输入 From 6f2a462ae6651d3bf35c27e593374dca28055bf1 Mon Sep 17 00:00:00 2001 From: arvinxx Date: Sat, 6 Feb 2021 11:55:08 +0800 Subject: [PATCH 2/7] =?UTF-8?q?:construction=5Fworker:=20ci:=20=E5=B0=9D?= =?UTF-8?q?=E8=AF=95=E6=96=B0=E7=9A=84=20cache=20=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/actions/setup-node/action.yml | 18 ------------------ .github/workflows/test.yml | 8 ++++++-- 2 files changed, 6 insertions(+), 20 deletions(-) delete mode 100644 .github/actions/setup-node/action.yml 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/test.yml b/.github/workflows/test.yml index 839f64a4..87d5953a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,8 +23,12 @@ jobs: - name: Yarn cache uses: actions/cache@v2 with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }} + path: | + ~/.npm + ~/cache + !~/cache/exclude + **/node_modules + key: yarn-build-${{ runner.os }}-${{ hashFiles('yarn.lock') }} - name: Install run: yarn From 5dab8abee647fc6b0f0436a5b3a9553917846d16 Mon Sep 17 00:00:00 2001 From: arvinxx Date: Sat, 6 Feb 2021 12:04:26 +0800 Subject: [PATCH 3/7] =?UTF-8?q?:construction=5Fworker:=20ci:=20=E5=B0=9D?= =?UTF-8?q?=E8=AF=95=E6=96=B0=E7=9A=84=20cache=20=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cache.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 21c097a9..8cc3edfe 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -19,8 +19,12 @@ jobs: - name: Yarn cache uses: actions/cache@v2 with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }} + path: | + ~/.npm + ~/cache + !~/cache/exclude + **/node_modules + key: yarn-build-${{ runner.os }}-${{ hashFiles('yarn.lock') }} - name: Install run: yarn From 36a8dd9acf7f974dd8f61f9f877c6c989b52e180 Mon Sep 17 00:00:00 2001 From: arvinxx Date: Sat, 6 Feb 2021 12:34:19 +0800 Subject: [PATCH 4/7] =?UTF-8?q?:construction=5Fworker:=20ci:=20=E6=81=A2?= =?UTF-8?q?=E5=A4=8D=E4=B9=8B=E5=89=8D=E7=9A=84=20cache=20=E8=B7=AF?= =?UTF-8?q?=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cache.yml | 8 ++------ .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 8 ++------ .npmrc | 1 - 4 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 8cc3edfe..21c097a9 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -19,12 +19,8 @@ jobs: - name: Yarn cache uses: actions/cache@v2 with: - path: | - ~/.npm - ~/cache - !~/cache/exclude - **/node_modules - key: yarn-build-${{ runner.os }}-${{ hashFiles('yarn.lock') }} + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }} - name: Install run: yarn diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7f0aa005..39426706 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,7 +50,7 @@ jobs: check: needs: precheck - name: Code quality and Release check + name: Code quality(ubuntu-latest) and Release check runs-on: ubuntu-latest outputs: # 将 semantic 输出的值作为下一环节的输入 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 87d5953a..839f64a4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,12 +23,8 @@ jobs: - name: Yarn cache uses: actions/cache@v2 with: - path: | - ~/.npm - ~/cache - !~/cache/exclude - **/node_modules - key: yarn-build-${{ runner.os }}-${{ hashFiles('yarn.lock') }} + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }} - name: Install run: yarn 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 From 6b91babe8d6f1f2224df204db9264e8a68a66258 Mon Sep 17 00:00:00 2001 From: arvinxx Date: Sat, 6 Feb 2021 12:54:19 +0800 Subject: [PATCH 5/7] =?UTF-8?q?:construction=5Fworker:=20ci:=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20release=20=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 39426706..ef1e25e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }} From 93a8445fbf44fc1dba3a27ff8a951f260faaa2c4 Mon Sep 17 00:00:00 2001 From: arvinxx Date: Sat, 6 Feb 2021 13:00:21 +0800 Subject: [PATCH 6/7] =?UTF-8?q?:construction=5Fworker:=20ci:=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E7=BC=93=E5=AD=98=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cache.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 21c097a9..2f55ac80 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -23,4 +23,5 @@ jobs: key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }} - name: Install + if: steps.yarn-cache.outputs.cache-hit != 'true' run: yarn From d0c0943c72d13ded4cfa82a8c9b6e857af63fd23 Mon Sep 17 00:00:00 2001 From: arvinxx Date: Sat, 6 Feb 2021 13:01:42 +0800 Subject: [PATCH 7/7] =?UTF-8?q?:construction=5Fworker:=20ci:=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E7=BC=93=E5=AD=98=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cache.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 2f55ac80..ce27ce28 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -18,6 +18,7 @@ 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') }}