Commit d1cb17e
ci: add PyPI Trusted Publishing workflow
Adds .github/workflows/publish.yml so future releases publish to PyPI
automatically when a GitHub Release is published, using PyPI's OIDC
Trusted Publishing instead of a long-lived API token stored as a repo
secret.
Workflow:
- build job: checkout, build sdist+wheel, twine check, upload as
workflow artifact.
- publish-pypi job: downloads the artifact and uploads to PyPI via
pypa/gh-action-pypi-publish, gated on the `pypi` environment with
id-token write permission for OIDC.
One-time setup required on PyPI side (cannot be done from this repo):
1. https://pypi.org/manage/project/python-pptx-extended/settings/publishing/
2. Add a GitHub publisher with:
owner: MHoroszowski
repository: python-pptx
workflow: publish.yml
environment: pypi
3. (Recommended) Create a `pypi` environment in repo Settings →
Environments with branch protection requiring tag-based deploys.
Triggering a release after setup:
- Cut a GitHub Release pointing at a vX.Y.Z tag — this fires the
workflow on `release: published`.
- workflow_dispatch is also wired for manual re-runs / overrides.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 14ee64c commit d1cb17e
1 file changed
Lines changed: 59 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
0 commit comments