aufbau 0.1.2

Generalized prefix parsing for a class of context-dependent languages
Documentation
name: Publish Python Package

on:
  release:
    types: [published]
  workflow_dispatch: {}

env:
  CARGO_TERM_COLOR: always

jobs:
  publish:
    name: Validate and publish to PyPI
    runs-on: ubuntu-latest
    permissions:
      contents: read

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Set up Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: stable

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.11"

      - name: Rust cache
        uses: Swatinem/rust-cache@v2

      - name: Validate Python FFI compiles
        run: cargo check --all-targets --features python-ffi --locked

      - name: Build wheels and source distribution
        uses: PyO3/maturin-action@v1
        with:
          command: build
          args: --release --features python-ffi --sdist --out dist

      - name: Publish to PyPI
        uses: PyO3/maturin-action@v1
        env:
          MATURIN_PYPI_TOKEN: ${{ secrets.MATURIN_PYPI_TOKEN }}
        with:
          command: upload
          args: --non-interactive --skip-existing dist/*