Skip to content

Commit af58248

Browse files
authored
fix: 修复release创建失败的问题 (#20)
- 合并 code-quality、dependency-check 和 build-test 为单个工作流 - 添加安全检查步骤 - 移除单独的 PR Check 工作流 - 更新 CI 工作流触发条件,支持 push 和 pull_request - 在 .release-please-config.json 中添加 skip-github-release 配置项
1 parent 7e1d0cd commit af58248

File tree

3 files changed

+28
-46
lines changed

3 files changed

+28
-46
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,44 @@ name: CI
33
on:
44
pull_request:
55
branches: [main, master]
6-
push:
7-
branches: [main, master]
86

97
jobs:
108
code-quality:
119
name: Code Quality
1210
uses: ./.github/workflows/code-quality.yml
1311

14-
test:
15-
name: Test
12+
build-test:
13+
name: Build Test
1614
uses: ./.github/workflows/build-test.yml
1715
with:
1816
test_matrix: '["ubuntu-latest", "windows-latest", "macos-latest"]'
1917
secrets: inherit
2018

19+
dependency-check:
20+
name: Dependency Check
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Node.js and pnpm
27+
uses: ./.github/actions/setup-node-pnpm
28+
29+
- name: Check for outdated dependencies
30+
run: |
31+
echo "📦 Checking for outdated dependencies..."
32+
pnpm outdated || echo "✅ All dependencies are up to date"
33+
34+
- name: Check for unused dependencies
35+
run: |
36+
echo "🔍 Checking for unused dependencies..."
37+
npx depcheck || echo "⚠️ Some dependencies might be unused"
38+
39+
- name: Security audit
40+
run: |
41+
echo "🔒 Running security audit..."
42+
pnpm audit --audit-level moderate || echo "⚠️ Security vulnerabilities found"
43+
2144
security:
2245
name: Security Check
2346
runs-on: ubuntu-latest

.github/workflows/pr-check.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.release-please-config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"bump-minor-pre-major": false,
1010
"bump-patch-for-minor-pre-major": false,
1111
"draft": false,
12+
"skip-github-release": true,
1213
"changelog-types": [
1314
{
1415
"type": "feat",

0 commit comments

Comments
 (0)