From 0ae08d6b4a7bdec07789856e8af0023e2ff2de8e Mon Sep 17 00:00:00 2001 From: chu fan Date: Thu, 28 Sep 2023 09:32:43 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=B5=81=E6=B0=B4=E7=BA=BF=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E7=BC=93=E5=AD=98=E6=9C=BA=E5=88=B6=EF=BC=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E4=BE=9D=E8=B5=96=E5=AE=89=E8=A3=85=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CD.yaml | 14 ++++++++------ .github/workflows/CI.yml | 14 ++++++++------ scripts/ci | 4 ++++ scripts/release | 2 +- 4 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 scripts/ci diff --git a/.github/workflows/CD.yaml b/.github/workflows/CD.yaml index 623e027..d72c7be 100644 --- a/.github/workflows/CD.yaml +++ b/.github/workflows/CD.yaml @@ -30,16 +30,18 @@ jobs: # “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录 fetch-depth: 0 - - name: Install Node.js - uses: actions/setup-node@v3 - with: - node-version: 16.20.2 - - name: PNPM Install uses: pnpm/action-setup@v2 with: version: 7 - run_install: true + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 16.20.2 + cache: 'pnpm' + run: | + pnpm i --frozen-lockfile --registry https://registry.npmmirror.com - name: Cache Dependencies uses: actions/cache@v3 diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0b41a40..20a9d08 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -34,16 +34,18 @@ jobs: # “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录 fetch-depth: 0 - - name: Install Node.js - uses: actions/setup-node@v3 - with: - node-version: 16.20.2 - - name: PNPM Install uses: pnpm/action-setup@v2 with: version: 7 - run_install: true + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 16.20.2 + cache: 'pnpm' + run: | + pnpm i --frozen-lockfile --registry https://registry.npmmirror.com - name: Cache Dependencies uses: actions/cache@v3 diff --git a/scripts/ci b/scripts/ci new file mode 100644 index 0000000..9286361 --- /dev/null +++ b/scripts/ci @@ -0,0 +1,4 @@ +#!/bin/bash + +## 下载依赖 +pnpm i --frozen-lockfile --registry https://registry.npmmirror.com \ No newline at end of file diff --git a/scripts/release b/scripts/release index 2a0a139..e23dbf8 100755 --- a/scripts/release +++ b/scripts/release @@ -7,7 +7,7 @@ ## ## 利用commit-and-tag-version生成changelog文档,并跳过commit、tag操作 -readonly generateChangeLog='pnpm commit-and-tag-version && git add CHANGELOG.md' +readonly generateChangeLog='commit-and-tag-version && git add CHANGELOG.md' ## git提交信息 readonly commitInfo='chore(release): publish v%s'