Skip to content

Commit 0fb18df

Browse files
committed
ci: fail when the committed dist is stale
dist/ is shipped in the repo because git/package installs require the compiled runtime; verify after build that it matches the sources.
1 parent 37dfe49 commit 0fb18df

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,14 @@ jobs:
2525
- name: Build
2626
run: npm run build
2727

28+
- name: Verify committed dist matches the build
29+
run: |
30+
if [ -n "$(git status --porcelain dist)" ]; then
31+
echo "dist/ is out of date with the TypeScript sources."
32+
echo "Run 'npm run build' and commit the updated dist/."
33+
git diff --stat dist
34+
exit 1
35+
fi
36+
2837
- name: Unit tests
2938
run: npm test

0 commit comments

Comments
 (0)