ci: publish to PyPI on version tags#348
Conversation
Add .github/workflows/publish.yml: pushing a PEP 440 tag (v0.3.0, v0.3.0rc1, v0.3.0.dev2, …) derives the version from the tag, injects it into pyproject.toml, builds, publishes to PyPI via OIDC trusted publishing (no stored token), and creates a GitHub Release with generated notes. Mirrors the OpenKnowledgeBase publish flow; keeps poetry-core as the build backend and injects the version in CI, so contributors' local builds are unaffected. Action refs pinned to commit SHAs (Node 24 releases). One-time setup: a PyPI Trusted Publisher on the pageindex project (VectifyAI/PageIndex, workflow publish.yml, environment pypi) and a GitHub Environment named pypi. Claude-Session: https://claude.ai/code/session_01Kx5DgKbhK1N8autqXH8SmS
Code reviewFound 1 issue:
The workflow's build step assumes This appears to have been copied from PR #347 (which correctly targets PageIndex/.github/workflows/publish.yml Lines 43 to 52 in e048991 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
|
closed as #347 has merged into dev. |
Adds a tag-triggered PyPI release workflow directly on
main, so the stable branch owns the release infrastructure independently ofdev.What it does
Pushing a PEP 440 tag with a leading
v(v0.3.0,v0.3.0rc1,v0.3.0.dev2, …) triggers.github/workflows/publish.yml, which:pyproject.toml;Scope
Single file:
.github/workflows/publish.yml. No code changes.Supersedes the dev-based #347 (same workflow, targeted at
maininstead).