Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: check-dist

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
check-dist:
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v6

- name: setup node
uses: actions/setup-node@v6

- name: npm ci
run: npm ci

- name: rebuild distribution code
run: npm run build

- name: validate distribution code
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Detect untracked files in dist validation

The validate distribution code check only inspects git diff dist/, which ignores untracked files; this means the workflow can pass even when npm run build creates new files in dist/ (for example, a newly generated artifact) that were never committed. Because this workflow is intended to enforce that generated distribution output is fully committed, missing untracked artifacts is a correctness gap in the guard.

Useful? React with 👍 / 👎.

echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
Loading