diff --git a/.commitlintrc.yml b/.commitlintrc.yml new file mode 100644 index 00000000..880a7960 --- /dev/null +++ b/.commitlintrc.yml @@ -0,0 +1,19 @@ +# Configuration for commitlint +--- +# Basic set of roules taken from https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional +extends: + - "@commitlint/config-conventional" +# Override type-enum to just use types, which are relevant to this project +rules: + type-enum: + - 2 + - always + - - build + - chore + - ci + - docs + - feat + - fix + - refactor + - revert + - test \ No newline at end of file diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index bf0e80b8..864bb666 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -1,4 +1,4 @@ -name: golangci-lint +name: linter on: push: tags: @@ -17,4 +17,12 @@ jobs: uses: golangci/golangci-lint-action@v4 with: version: latest - working-directory: pkg \ No newline at end of file + working-directory: pkg + + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: wagoid/commitlint-github-action@v5 \ No newline at end of file