name: Release Guard

on:
  push:
    branches: [main]
  pull_request:

env:
  FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
  version:
    name: Check SDK release plan
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
      - name: Check release version
        env:
          BASE_REF_SHA: ${{ github.event.pull_request.base.sha || '' }}
          PACKAGE_KIND: rust
          RELEASE_RELEVANT_PATHS: |
            src
            Cargo.toml
            README.md
            LICENSE
        run: python .github/scripts/release_guard.py
