diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..4b9120d --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,20 @@ +name: Pull request +# This workflow is triggered on pushes to the repository. +on: [ pull_request ] + +jobs: + check: + name: Check Commit Message + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + # A PR should not contain too many commits + fetch-depth: 10 + - name: Validate commit messages + run: | + git show-ref + curl -sSfL https://github.com/convco/convco/releases/latest/download/convco-ubuntu.zip | zcat > convco + chmod +x convco + ./convco check ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} + rm convco diff --git a/.github/workflows/semver-checks.yml b/.github/workflows/semver-checks.yml new file mode 100644 index 0000000..205f0c2 --- /dev/null +++ b/.github/workflows/semver-checks.yml @@ -0,0 +1,18 @@ +name: Semver Checks +on: + push: + branches: + - main + pull_request: + +jobs: + semver: + name: cargo-semver-checks + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + + - name: check semver + uses: obi1kenobi/cargo-semver-checks-action@v2.6