Skip to content

Commit 8a8510e

Browse files
authored
ci: verify dist bundle freshness (#762)
Signed-off-by: Rui Chen <rui@chenrui.dev>
1 parent 438c15d commit 8a8510e

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ jobs:
1919
run: npm ci
2020
- name: Build
2121
run: npm run build
22+
- name: Check dist freshness
23+
run: |
24+
git diff --exit-code --stat -- dist/index.js \
25+
|| (echo "##[error] found changed dist/index.js after build. please run 'npm run build' and commit the updated bundle" \
26+
&& exit 1)
2227
- name: Test
2328
run: npm run test
2429
- name: Format
2530
run: npm run fmtcheck
26-
# - name: "check for uncommitted changes"
27-
# # Ensure no changes, but ignore node_modules dir since dev/fresh ci deps installed.
28-
# run: |
29-
# git diff --exit-code --stat -- . ':!node_modules' \
30-
# || (echo "##[error] found changed files after build. please 'npm run build && npm run fmt'" \
31-
# "and check in all changes" \
32-
# && exit 1)

0 commit comments

Comments
 (0)