Files
action-gh-release/.github/workflows/main.yml
Rui Chen 8a8510e3a0 ci: verify dist bundle freshness (#762)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2026-03-15 13:45:27 -04:00

31 lines
782 B
YAML

name: main
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
node-version-file: ".tool-versions"
cache: "npm"
- name: Install
run: npm ci
- name: 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
run: npm run test
- name: Format
run: npm run fmtcheck