Skip to content

Commit

Permalink
Add a workflow to verify that dist/ is up to date
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Apr 8, 2021
1 parent 893d6ed commit f402706
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/verify-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Verify that dist is compiled

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm ci
- run: npm run lint
- run: npm run prepare
- name: Verify that `dist/index.js` is up to date
shell: bash
run: |
# `ncc` might produce output with mixed line endings
test -z "$(git diff -w HEAD | tee diff.txt)" || {
echo 'Files changed after `npm run package`'
cat diff.txt
exit 1
}

0 comments on commit f402706

Please sign in to comment.