Skip to content
Merged
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
26 changes: 26 additions & 0 deletions .github/workflows/publish-dists.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -85,3 +87,27 @@ jobs:

cd -
done

validate:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Validate commit messages
run: |
commit_range="${{ github.event.before }}..HEAD"
git log $commit_range --pretty=format:%s | while read -r msg; do
echo "$msg" | grep -E '^(feat|fix|docs|chore|test|refactor): .+' || { echo "Invalid commit message: $msg"; exit 1; }
done

- name: Validate file paths
run: |
invalid_files=$(git diff --name-only HEAD~1 | grep -vE '^(src/|test/|config/)')
if [ -n "$invalid_files" ]; then
echo "Invalid file paths: $invalid_files"
exit 1
fi