cripsy-binary-api 0.3.1

API moderna multibroker para opciones binarias (Rust, sync y async)
Documentation
name: Python wheels

on:
  workflow_dispatch:
  push:
    tags: ["v*"]

permissions:
  contents: write

jobs:
  wheels:
    name: Wheel (${{ matrix.plataforma }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: ubuntu-latest
            plataforma: linux-x64
          - os: ubuntu-24.04-arm
            plataforma: linux-arm64
          - os: windows-latest
            plataforma: windows-x64
          - os: windows-11-arm
            plataforma: windows-arm64
          - os: macos-15-intel
            plataforma: macos-intel
          - os: macos-latest
            plataforma: macos-arm64
    steps:
      - uses: actions/checkout@v4
      - uses: PyO3/maturin-action@v1
        with:
          args: --release --out dist --compatibility pypi --manifest-path python/Cargo.toml
          manylinux: auto
      - uses: actions/upload-artifact@v4
        with:
          name: wheels-${{ matrix.plataforma }}
          path: dist/*.whl

  sdist:
    name: Sdist
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: PyO3/maturin-action@v1
        with:
          command: sdist
          args: --out dist --manifest-path python/Cargo.toml
      - uses: actions/upload-artifact@v4
        with:
          name: sdist
          path: dist/*.tar.gz

  release:
    name: Adjuntar al release
    if: startsWith(github.ref, 'refs/tags/')
    needs: [wheels, sdist]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/download-artifact@v4
        with:
          path: dist
          merge-multiple: true
      - uses: softprops/action-gh-release@v2
        with:
          files: dist/*

  # Publicacion en PyPI: pendiente de configurar el secreto PYPI_API_TOKEN.
  # Cuando exista, descomentar este job (o usar trusted publishing con OIDC).
  #
  # publish:
  #   name: Publicar en PyPI
  #   if: startsWith(github.ref, 'refs/tags/')
  #   needs: [wheels, sdist]
  #   runs-on: ubuntu-latest
  #   steps:
  #     - uses: actions/download-artifact@v4
  #       with: { path: dist, merge-multiple: true }
  #     - uses: PyO3/maturin-action@v1
  #       with: { command: upload, args: "--skip-existing dist/*" }
  #       env:
  #         MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}