From e55c02ecc33dc9e74d28f4a97cdaa2f0674bd2b8 Mon Sep 17 00:00:00 2001 From: Ronald Tse Date: Wed, 11 Nov 2026 14:20:21 +0800 Subject: [PATCH] ci: dispatch-ready PyPI trusted-publishing workflow for interscript-py The interscript-py runtime ships inside this repo with no release path. This workflow builds the sdist/wheel and publishes via PyPI OIDC trusted publishing - dispatch-only, gated on the owner registering interscript-py as a pending trusted publisher on pypi.org (repo interscript-ruby, workflow release-py.yml). Not dispatched: the PyPI gate stays owner-held, and the first version number is the owner's call (pyproject.toml currently 0.1.0, never published). --- .github/workflows/release-py.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/release-py.yml diff --git a/.github/workflows/release-py.yml b/.github/workflows/release-py.yml new file mode 100644 index 00000000..40bc3360 --- /dev/null +++ b/.github/workflows/release-py.yml @@ -0,0 +1,32 @@ +name: release-py + +# PyPI Trusted Publishing: the package owner registers `interscript-py` +# on pypi.org (Publishing -> add a pending trusted publisher: +# owner interscript, repository interscript-ruby, workflow +# release-py.yml) — until that registration exists, the OIDC exchange +# is rejected. The version comes from interscript-py/pyproject.toml; +# bump it via PR first (versions are owner decisions). Dispatch only +# after the version is merged. + +on: + workflow_dispatch: + +permissions: + id-token: write + +jobs: + pypi: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Build sdist and wheel + run: | + python -m pip install --upgrade build + python -m build --outdir dist interscript-py + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: dist