File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed
Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -54,22 +54,16 @@ jobs:
5454 run : npm run lint
5555
5656 - name : Check dist bundles
57- if : matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request'
57+ if : matrix.os == 'ubuntu-latest'
5858 run : |
59- # Get files changed in this PR
60- git fetch origin ${{ github.base_ref }} --depth=1
61- changed_files=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)
62-
63- # Check for source and dist changes
64- source_changed=$(echo "$changed_files" | grep -E '\.ts$' || true)
65- dist_changed=$(echo "$changed_files" | grep -E '/dist/' || true)
66-
67- if [ -n "$source_changed" ] && [ -z "$dist_changed" ]; then
68- echo "::warning::Source files changed but no dist/ files were updated. Run 'npm run build' and commit the updated dist/ files."
69- echo "Changed source files:"
70- echo "$source_changed"
71- else
59+ # npm install already ran prepare (which rebuilds all workspaces).
60+ # If any dist/ file differs from what is committed, the bundle is stale.
61+ if git diff --quiet -- '*/dist/'; then
7262 echo "Dist bundle check passed"
63+ else
64+ echo "::warning::dist/ files are out of date. Run 'npm run build' and commit the updated dist/ files."
65+ echo "Out-of-date files:"
66+ git diff --name-only -- '*/dist/'
7367 fi
7468
7569 # ===========================================================================
You can’t perform that action at this time.
0 commit comments