Skip to content

Commit 3fad804

Browse files
Copilothuangyiirene
andcommitted
fix: improve workflow robustness and correctness based on code review
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
1 parent 69e020c commit 3fad804

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,18 @@ jobs:
9797
- name: Build packages
9898
run: pnpm run build
9999

100+
- name: Verify build outputs
101+
run: |
102+
if [ ! -d "packages/spec/dist" ]; then
103+
echo "Error: packages/spec/dist directory not found"
104+
exit 1
105+
fi
106+
if [ ! -d "packages/spec/json-schema" ]; then
107+
echo "Error: packages/spec/json-schema directory not found"
108+
exit 1
109+
fi
110+
echo "Build outputs verified successfully"
111+
100112
- name: Upload build artifacts
101113
uses: actions/upload-artifact@v4
102114
with:

.github/workflows/pr-automation.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ jobs:
7575

7676
- name: Check for changesets
7777
run: |
78-
if [ -z "$(ls -A .changeset | grep -v README.md | grep -v config.json)" ]; then
78+
CHANGESET_COUNT=$(find .changeset -name '*.md' ! -name 'README.md' | wc -l)
79+
if [ "$CHANGESET_COUNT" -eq 0 ]; then
7980
echo "::warning::No changeset found. Please add a changeset if this PR includes user-facing changes."
8081
echo "Run 'pnpm changeset' to create one, or add the 'skip-changeset' label if not needed."
82+
else
83+
echo "Found $CHANGESET_COUNT changeset(s)"
8184
fi

.github/workflows/validate-deps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ jobs:
7070

7171
- name: Check licenses
7272
run: |
73-
npx license-checker --summary --exclude "MIT,Apache-2.0,ISC,BSD-2-Clause,BSD-3-Clause,0BSD,CC0-1.0,Unlicense,Python-2.0" || true
73+
npx license-checker --summary --exclude "MIT,Apache-2.0,ISC,BSD-2-Clause,BSD-3-Clause,0BSD,CC0-1.0,Unlicense" || true

0 commit comments

Comments
 (0)