Skip to content

Add tag-triggered PyPI publish workflow via Trusted Publishing - #2

Merged
BaliDataMan merged 1 commit into
mainfrom
ci/pypi-publish
Sep 4, 2026
Merged

BaliDataMan merged 1 commit into
mainfrom
ci/pypi-publish

Conversation

@BaliDataMan

Copy link
Copy Markdown
Owner

Summary

  • New workflow (.github/workflows/publish.yml), separate from ci.yml, triggered only on push of a v* tag.
  • Uses PyPI Trusted Publishing (OIDC) — no PYPI_API_TOKEN secret required, but the trusted publisher must be configured on pypi.org first (see below).
  • Guards against publishing a version that doesn't match the tag, so a version bump in pyproject.toml is required before every release.

Required manual setup before this can actually publish

On https://pypi.org/manage/project/ragmesh/settings/publishing/, add a trusted publisher:

  • Repository: BaliDataMan/ragmesh
  • Workflow filename: publish.yml
  • Environment name: pypi (matches this workflow's environment: pypi)

Also create a "pypi" environment under repo Settings > Environments (optional, but recommended as an approval gate before publish).

Test plan

  • uv build verified locally — produces both the wheel and sdist correctly
  • Not yet tested end-to-end (needs the PyPI trusted-publisher setup above, then a real tag push to trigger it)

Publishes on push of a v* tag, using OIDC trusted publishing (no
long-lived PyPI token secret needed). Verifies the tag version
matches pyproject.toml before building/publishing, so a version bump
is required before every release.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@BaliDataMan
BaliDataMan merged commit 36b9a58 into main Sep 4, 2026
2 checks passed
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