refactor: move distributed files to src/, add sync check CI
- Distributed files now live in src/ — consumers use `path: src/` - Top-level files are identical copies (repo eats its own dog food) - CI sync-check job validates top-level and src/ stay in sync - Removed .common-repo.yaml (path: scoping replaces source excludes) - Updated README with new structure and usage
This commit is contained in:
44
.github/workflows/ci.yaml
vendored
Normal file
44
.github/workflows/ci.yaml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
sync-check:
|
||||
name: Verify src/ sync
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
||||
- name: Check top-level files match src/
|
||||
run: |
|
||||
# Verify distributed files in src/ match the repo's own copies
|
||||
status=0
|
||||
for file in .releaserc.yaml commitlint.config.js; do
|
||||
if ! diff -q "$file" "src/$file" > /dev/null 2>&1; then
|
||||
echo "❌ $file differs from src/$file"
|
||||
diff --color "$file" "src/$file" || true
|
||||
status=1
|
||||
else
|
||||
echo "✅ $file matches src/$file"
|
||||
fi
|
||||
done
|
||||
for file in .github/workflows/commitlint.yml .github/workflows/release.yaml; do
|
||||
if ! diff -q "$file" "src/$file" > /dev/null 2>&1; then
|
||||
echo "❌ $file differs from src/$file"
|
||||
diff --color "$file" "src/$file" || true
|
||||
status=1
|
||||
else
|
||||
echo "✅ $file matches src/$file"
|
||||
fi
|
||||
done
|
||||
if [ $status -ne 0 ]; then
|
||||
echo ""
|
||||
echo "Top-level files and src/ are out of sync."
|
||||
echo "Copy changes to both locations, or run: cp .releaserc.yaml commitlint.config.js src/ && cp .github/workflows/commitlint.yml .github/workflows/release.yaml src/.github/workflows/"
|
||||
exit 1
|
||||
fi
|
||||
echo ""
|
||||
echo "All distributed files in sync ✅"
|
||||
Reference in New Issue
Block a user