From 15851217c5705aa2f9b203b717d6e8ab070c56a2 Mon Sep 17 00:00:00 2001 From: sunerpy Date: Thu, 24 Jul 2025 17:13:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Drelease=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 合并 code-quality、dependency-check 和 build-test 为单个工作流 - 添加安全检查步骤 - 移除单独的 PR Check 工作流 - 更新 CI 工作流触发条件,支持 push 和 pull_request - 在 .release-please-config.json 中添加 skip-github-release 配置项 --- .github/workflows/ci.yml | 31 +++++++++++++++++++++---- .github/workflows/pr-check.yml | 42 ---------------------------------- .release-please-config.json | 1 + 3 files changed, 28 insertions(+), 46 deletions(-) delete mode 100644 .github/workflows/pr-check.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c9d49a..4a391b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,21 +3,44 @@ name: CI on: pull_request: branches: [main, master] - push: - branches: [main, master] jobs: code-quality: name: Code Quality uses: ./.github/workflows/code-quality.yml - test: - name: Test + build-test: + name: Build Test uses: ./.github/workflows/build-test.yml with: test_matrix: '["ubuntu-latest", "windows-latest", "macos-latest"]' secrets: inherit + dependency-check: + name: Dependency Check + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js and pnpm + uses: ./.github/actions/setup-node-pnpm + + - name: Check for outdated dependencies + run: | + echo "📦 Checking for outdated dependencies..." + pnpm outdated || echo "✅ All dependencies are up to date" + + - name: Check for unused dependencies + run: | + echo "🔍 Checking for unused dependencies..." + npx depcheck || echo "⚠️ Some dependencies might be unused" + + - name: Security audit + run: | + echo "🔒 Running security audit..." + pnpm audit --audit-level moderate || echo "⚠️ Security vulnerabilities found" + security: name: Security Check runs-on: ubuntu-latest diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml deleted file mode 100644 index 9fccacb..0000000 --- a/.github/workflows/pr-check.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: PR Check - -on: - pull_request: - branches: [main, master] - -jobs: - code-quality: - name: Code Quality - uses: ./.github/workflows/code-quality.yml - - dependency-check: - name: Dependency Check - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js and pnpm - uses: ./.github/actions/setup-node-pnpm - - - name: Check for outdated dependencies - run: | - echo "📦 Checking for outdated dependencies..." - pnpm outdated || echo "✅ All dependencies are up to date" - - - name: Check for unused dependencies - run: | - echo "🔍 Checking for unused dependencies..." - npx depcheck || echo "⚠️ Some dependencies might be unused" - - - name: Security audit - run: | - echo "🔒 Running security audit..." - pnpm audit --audit-level moderate || echo "⚠️ Security vulnerabilities found" - - build-test: - name: Build Test - uses: ./.github/workflows/build-test.yml - with: - test_matrix: '["ubuntu-latest", "windows-latest", "macos-latest"]' - secrets: inherit diff --git a/.release-please-config.json b/.release-please-config.json index ffa124d..af61ed3 100644 --- a/.release-please-config.json +++ b/.release-please-config.json @@ -9,6 +9,7 @@ "bump-minor-pre-major": false, "bump-patch-for-minor-pre-major": false, "draft": false, + "skip-github-release": true, "changelog-types": [ { "type": "feat",