Skip to content

Commit a2fac7a

Browse files
authored
Merge pull request #252 from potiuk/ci-verify-dist
ci: verify committed dist/ matches a clean rebuild
2 parents 4c2e5f0 + 772f27d commit a2fac7a

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

‎.github/workflows/CI.yml‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,30 @@ jobs:
3737
- name: Build & Test
3838
run: npm run test
3939

40+
verify-dist:
41+
name: Verify dist/ is up to date
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@v6
46+
- name: Setup Node.js
47+
uses: actions/setup-node@v6
48+
with:
49+
node-version: 24.x
50+
cache: npm
51+
52+
- name: npm ci
53+
run: npm ci
54+
- name: Rebuild dist/
55+
run: npm run build
56+
- name: Check dist/ matches committed output
57+
run: |
58+
if ! git diff --exit-code -- dist/; then
59+
echo "::error::Committed dist/ does not match a clean rebuild from source."
60+
echo "::error::Run 'npm ci && npm run build' locally and commit the updated dist/ before releasing."
61+
exit 1
62+
fi
63+
4064
test:
4165
name: Test version
4266
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)