Skip to content

ci: PyPI publish workflow (Trusted Publishing)#25

Merged
peterkimpmp merged 1 commit into
mainfrom
ci/pypi-publish-workflow
Jun 2, 2026
Merged

ci: PyPI publish workflow (Trusted Publishing)#25
peterkimpmp merged 1 commit into
mainfrom
ci/pypi-publish-workflow

Conversation

@peterkimpmp

Copy link
Copy Markdown
Contributor

Summary

Automates the manual twine upload step used for every release so far (0.1.0a7, 0.2.0a2, 0.2.0a3, 0.3.0a1 were all hand-uploaded).

Adds .github/workflows/publish.yml:

  • Triggers on GitHub Release published (workflow_dispatch for manual re-run).
  • build job: python -m buildtwine checkverifies the release tag matches pyproject version (guards the v0.3.0a1-style tag↔version parity we enforce manually).
  • publish job: PyPI Trusted Publishing (OIDC) via pypa/gh-action-pypi-publish — no API token stored as a secret.

Why

Until now GitHub release and PyPI upload were two separate manual steps; missing the second one left STATUS.md's pypi.org/.../0.3.0a1/ link as a 404 (fixed by a manual upload). This closes that gap permanently.

One-time setup required (maintainer, PyPI side)

PyPI → project sillok → Settings → Publishing → Add a trusted publisher:

  • Owner sillok-os · Repository sillok · Workflow publish.yml · Environment pypi

After that, publishing a Release auto-uploads the matching dist.

Validation

  • python -m yaml parse OK.
  • Build/check/upload steps mirror the exact local pipeline used to ship 0.3.0a1 (build → twine check PASSED → clean-install smoke).

Upstream: peterkimpmp/aipm#663

Automate the manual `twine upload` step. Builds sdist+wheel, runs
`twine check`, verifies the release tag matches the pyproject version,
then publishes via PyPI Trusted Publishing (OIDC) — no stored API token.

One-time PyPI-side setup documented in the workflow header (add trusted
publisher: owner=sillok-os, repo=sillok, workflow=publish.yml, env=pypi).

Signed-off-by: peterkimpmp <tykim21@gmail.com>
@peterkimpmp peterkimpmp merged commit d34d8ba into main Jun 2, 2026
5 checks passed
@peterkimpmp peterkimpmp deleted the ci/pypi-publish-workflow branch June 2, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant