ci: auto-publish CLI to PyPI on GitHub release#2
Conversation
Uses PyPI trusted publishing (OIDC) — no stored tokens needed. Triggered when a GitHub Release is published. Verifies the tag matches the version in pyproject.toml before uploading. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gp300 | c8a80c2 | Commit Preview URL Branch Preview URL |
Apr 12 2026, 05:29 PM |
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions release workflow to build and publish the gp300 Python CLI package to PyPI using Trusted Publishing (OIDC), with a guard that checks the GitHub Release tag version matches pyproject.toml.
Changes:
- Introduces a
Publish to PyPIworkflow triggered onrelease.published. - Builds sdist + wheel via
python -m build. - Verifies the release tag version matches the
project.versioninpyproject.toml, then publishes usingpypa/gh-action-pypi-publish.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| environment: pypi | ||
| permissions: | ||
| id-token: write # required for PyPI trusted publishing (OIDC) | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
|
@codex[agent] review this PR |
|
To use Codex here, create a Codex account and connect to github. |
Co-authored-by: DavyMorgan <27959377+DavyMorgan@users.noreply.github.com>
Reviewed and added |
|
To use Codex here, create a Codex account and connect to github. |
|
@copilot to review again. |
The workflow looks good. The previously flagged issue (missing |
Summary
Adds a GitHub Actions workflow that auto-publishes the CLI to PyPI when a GitHub Release is published. Uses PyPI trusted publishing (OIDC) — no stored tokens.
python -m buildpyproject.tomlversion (e.g. tagv0.1.2must matchversion = "0.1.2")pypa/gh-action-pypi-publishusing OIDCRelease workflow going forward
pyproject.tomlv<version>→ CI publishes automaticallyTest plan
v0.1.2) to verify end-to-end🤖 Generated with Claude Code