name: Check Release
on:
  push:
    branches: ['main']
  pull_request:

permissions:
  contents: read

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
  cancel-in-progress: true

jobs:
  check_release:
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - name: Checkout
        uses: actions/checkout@v6
      - name: Base Setup
        uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
      - name: Check Release
        uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          version_spec: next

      - name: Upload Distributions
        uses: actions/upload-artifact@v5
        with:
          name: notebook-jupyter-releaser-dist-${{ github.run_number }}
          path: .jupyter_releaser_checkout/dist
