From 21324ce9327e385e429a1f802f60032e913481ff Mon Sep 17 00:00:00 2001 From: Andrea Lamparelli Date: Sat, 25 Jul 2026 10:18:21 +0200 Subject: [PATCH] ci: verify dist/ bundle is up to date on pull requests Rebuilds the bundle with a clean lockfile install and fails if dist/ drifts, preventing a stale/mismatched bundle from being merged. --- .github/workflows/pull-request.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 66e43d8..7e34cb5 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -31,3 +31,21 @@ jobs: node-version: ${{ matrix.node-version }} - run: npm ci - run: npm test + + verify-dist: + name: Verify dist is up to date + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Setup Node + uses: actions/setup-node@v6 + with: + node-version: 24 + - run: npm ci + - run: npm run build + - name: Check for dist changes + run: | + if ! git diff --exit-code -- dist; then + echo "::error::The dist/ bundle is out of date. Run 'npm ci && npm run build' and commit the result." + exit 1 + fi