Skip to content

Commit f402706

Browse files
committed
Add a workflow to verify that dist/ is up to date
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 893d6ed commit f402706

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/verify-dist.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Verify that dist is compiled
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- run: npm ci
16+
- run: npm run lint
17+
- run: npm run prepare
18+
- name: Verify that `dist/index.js` is up to date
19+
shell: bash
20+
run: |
21+
# `ncc` might produce output with mixed line endings
22+
test -z "$(git diff -w HEAD | tee diff.txt)" || {
23+
echo 'Files changed after `npm run package`'
24+
cat diff.txt
25+
exit 1
26+
}

0 commit comments

Comments
 (0)