diff --git a/.github/workflows/_commit_msg.yml b/.github/workflows/_commit_msg.yml new file mode 100644 index 0000000..8bb4028 --- /dev/null +++ b/.github/workflows/_commit_msg.yml @@ -0,0 +1,18 @@ +name: commit-lint + +on: + workflow_call: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: Lint Commit Messages + uses: wagoid/commitlint-github-action@v6.2.1 + with: + failonWarnings: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a318365..7f576ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,16 +5,18 @@ on: branches: - main tags: - - '*' + - "*" pull_request: jobs: - lint: uses: ./.github/workflows/_tox.yml with: tox: pre-commit,type-checking + commit-lint: + uses: ./.github/workflows/_commit_msg.yml + test: strategy: matrix: @@ -38,7 +40,7 @@ jobs: dist: uses: ./.github/workflows/_dist.yml - + release: needs: [dist, test] if: github.ref_type == 'tag'