feat(ci): add GitHub Actions workflows for CI, linting, and commit validation #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Commit Lint | |
| on: | |
| pull_request: | |
| branches: [main, 2.0-development] | |
| permissions: | |
| contents: read | |
| jobs: | |
| commitlint: | |
| name: Validate Commit Messages | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install commitlint | |
| run: npm install -g @commitlint/{cli,config-conventional} | |
| - name: Create commitlint config | |
| run: | | |
| cat > .commitlintrc.json << 'EOF' | |
| { | |
| "extends": ["@commitlint/config-conventional"], | |
| "rules": { | |
| "type-enum": [2, "always", [ | |
| "feat", "fix", "refactor", "build", "deps", | |
| "chore", "docs", "test", "style", "ci", "perf" | |
| ]], | |
| "scope-enum": [1, "always", [ | |
| "core", "helpers", "deps", "release", "ci" | |
| ]], | |
| "subject-max-length": [1, "always", 100] | |
| } | |
| } | |
| EOF | |
| - name: Validate commits | |
| run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose |