Skip to content

Commit

Permalink
feat(ci): add distributed bundle check
Browse files Browse the repository at this point in the history
  • Loading branch information
nhedger committed Jul 12, 2022
1 parent f1f51e2 commit 102a293
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Check distributed bundle

on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: 16.x

- name: Install dependencies
run: npm ci

- name: Rebuild the dist/ directory
run: npm run build

- name: Compare the expected to the actual dist/ directory
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi

0 comments on commit 102a293

Please sign in to comment.