diff --git a/.github/workflows/README.md b/.github/workflows/README.md index e63dc51..658af6d 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -59,15 +59,17 @@ git push origin feature/my-feature ### 发布新版本 ```bash -# 1. 更新版本号 -npm version patch # 或 minor、major +# 1. 更新版本号并生成版本提交/标签 +pnpm version patch # 或 minor、major -# 2. 推送标签 +# 2. 推送 main 分支代码(只触发 CI,不会发布) git push origin main -git push origin --tags -# 3. 自动发布 -# → Release 工作流自动运行 +# 3. 推送本次版本标签(触发 Release 工作流) +git push origin v$(node -p "require('./package.json').version") + +# 4. 自动发布 +# → Release 工作流只在 v*.*.* 标签推送时运行 # → 生成 GitHub Release # → 附加可安装的 ZIP 文件 ``` diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f1a134e..4593c0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,8 +62,6 @@ jobs: # ------------------------------------------ - name: 📦 Setup pnpm uses: pnpm/action-setup@v4 - with: - version: 9.15.4 # ------------------------------------------ # 步骤 3: 设置 Node.js diff --git a/.github/workflows/complete-tests.yml b/.github/workflows/complete-tests.yml index 47b582e..fbcc38a 100644 --- a/.github/workflows/complete-tests.yml +++ b/.github/workflows/complete-tests.yml @@ -43,8 +43,6 @@ jobs: - name: 📦 Setup pnpm uses: pnpm/action-setup@v4 - with: - version: 9.15.4 - name: 🔧 Setup Node.js uses: actions/setup-node@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f30d044..27fb8c5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,8 +63,6 @@ jobs: # ------------------------------------------ - name: 📦 Setup pnpm uses: pnpm/action-setup@v4 - with: - version: 9.15.4 # ------------------------------------------ # 步骤 3: 设置 Node.js 环境