From 601283f05e50c79ea8136162e0e632616755fc61 Mon Sep 17 00:00:00 2001 From: Stephen Young Date: Wed, 6 May 2026 22:38:15 -0400 Subject: [PATCH] Add automated PyPI publish workflow for wheel and sdist Adds a GitHub Actions workflow triggered on releases that builds and publishes both wheel and sdist to PyPI using trusted publishing (OIDC). Previously only sdist was available on PyPI because publishing was manual. Requires configuring a "pypi" environment in GitHub repo settings and setting up trusted publishing on PyPI for this repo. Closes #112 --- .github/workflows/publish.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..b0eef53 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,35 @@ +name: Publish to PyPI + +on: + release: + types: [published] + +permissions: + contents: read + id-token: write + +jobs: + publish: + name: Build and publish + runs-on: ubuntu-latest + environment: pypi + steps: + - uses: actions/checkout@v6 + + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: "3.14" + cache: pip + cache-dependency-path: pyproject.toml + + - name: Install build tools + run: | + python -m pip install --upgrade pip + python -m pip install build + + - name: Build package + run: python -m build + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1