From e9f2e9d6bacb3b177fb2f450cece1e3b4883cf56 Mon Sep 17 00:00:00 2001 From: Anurag Rajawat Date: Fri, 21 Aug 2026 11:25:13 +0530 Subject: [PATCH] ci: add check-dist workflow --- .github/workflows/check-dist.yml | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/check-dist.yml diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml new file mode 100644 index 0000000..550a6ef --- /dev/null +++ b/.github/workflows/check-dist.yml @@ -0,0 +1,35 @@ +name: Check dist + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + check-dist: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + + - name: Set up Node + uses: actions/setup-node@v7 + with: + node-version-file: 'package.json' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build dist + run: npm run build + + - name: Check for uncommitted changes + run: | + if [ -n "$(git status --porcelain dist/)" ]; then + echo "::error::dist/ is out of date. Run 'npm run build' and commit the result." + git diff dist/ + exit 1 + fi