name: Release Krayt
on:
  workflow_dispatch:
  push:
    paths:
      - "krayt/**"
      - "pyproject.toml"
permissions:
  contents: write
  pull-requests: write
  issues: read
  packages: none
  id-token: write
jobs:
  release-krayt:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      # - uses: waylonwalker/hatch-action@v4
      #   with:
      #     before-command: "lint-format"
      #   env:
      #     # required for gh release
      #     GH_TOKEN: ${{ github.token }}
      - name: Install just
        run: |
          curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin
        shell: bash
      - name: Install uv
        run: |
          curl -LsSf https://astral.sh/uv/0.6.16/install.sh | sh
        shell: bash
      - name: GitHub Release (just release)
        run: just create-release
        shell: bash
