name: Semver Check
on:
  pull_request:
    types:
      - opened
      - reopened
      - synchronize
      - ready_for_review
    branches: [main]

jobs:
  semver:
    # skip draft PRs
    if: github.event.pull_request.draft == false
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
      with:
        fetch-depth: 0
    - name: Check Semver
      run: ./scripts/semver-check.sh