mirror of
https://github.com/softprops/action-gh-release.git
synced 2026-03-17 02:28:55 +08:00
ci: verify dist bundle freshness (#762)
Signed-off-by: Rui Chen <rui@chenrui.dev>
This commit is contained in:
12
.github/workflows/main.yml
vendored
12
.github/workflows/main.yml
vendored
@@ -19,14 +19,12 @@ jobs:
|
|||||||
run: npm ci
|
run: npm ci
|
||||||
- name: Build
|
- name: Build
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
- name: Check dist freshness
|
||||||
|
run: |
|
||||||
|
git diff --exit-code --stat -- dist/index.js \
|
||||||
|
|| (echo "##[error] found changed dist/index.js after build. please run 'npm run build' and commit the updated bundle" \
|
||||||
|
&& exit 1)
|
||||||
- name: Test
|
- name: Test
|
||||||
run: npm run test
|
run: npm run test
|
||||||
- name: Format
|
- name: Format
|
||||||
run: npm run fmtcheck
|
run: npm run fmtcheck
|
||||||
# - name: "check for uncommitted changes"
|
|
||||||
# # Ensure no changes, but ignore node_modules dir since dev/fresh ci deps installed.
|
|
||||||
# run: |
|
|
||||||
# git diff --exit-code --stat -- . ':!node_modules' \
|
|
||||||
# || (echo "##[error] found changed files after build. please 'npm run build && npm run fmt'" \
|
|
||||||
# "and check in all changes" \
|
|
||||||
# && exit 1)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user