burr 0.13.1

Design-rule checks for CAD-as-code workflows.
Documentation
name: Publish Python

on:
  workflow_dispatch:
    inputs:
      ref:
        description: Git ref to publish, usually burr-build123d-v0.8.0
        required: true
        type: string

permissions:
  contents: read
  id-token: write

jobs:
  publish:
    name: Publish burr-build123d
    runs-on: ubuntu-latest
    environment: pypi
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          ref: ${{ inputs.ref }}

      - name: Setup uv
        uses: astral-sh/setup-uv@v5

      - name: Setup Python
        run: uv python install 3.11

      - name: Build
        run: uv build --package burr-build123d

      - name: Publish
        run: |
          version="$(python - <<'PY'
          import pathlib
          import tomllib

          pyproject = pathlib.Path("packages/burr-build123d/pyproject.toml")
          print(tomllib.loads(pyproject.read_text())["project"]["version"])
          PY
          )"
          uv publish --trusted-publishing always \
            "dist/burr_build123d-${version}-"*.whl \
            "dist/burr_build123d-${version}.tar.gz"