name: release

on:
  push:
    tags:
      - "*"

jobs:
  build-abcd:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"

      - name: Build
        uses: ./.github/actions/build

  publish-abcd:
    needs:
      - build-abcd
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
      - name: Install uv
        run: pip install uv
      - name: Publish
        run: ./publish.sh ${{ secrets.PYPI_TOKEN }} ${{ secrets.GHCR_TOKEN }}
