Skip to content

feat: package for PyPI (pipx/uvx install + Trusted Publishing)#5

Merged
prasadus92 merged 2 commits into
mainfrom
feat/pypi-packaging
Jun 2, 2026
Merged

feat: package for PyPI (pipx/uvx install + Trusted Publishing)#5
prasadus92 merged 2 commits into
mainfrom
feat/pypi-packaging

Conversation

@prasadus92

Copy link
Copy Markdown
Owner

Makes vertex-proxy installable as a published package, so users can pipx install vertex-proxy instead of cloning. Per the maintainer's call, this targets PyPI only (no Homebrew, no curl|bash).

What's in here

  • Release workflow (.github/workflows/release.yml): on a v* tag, builds sdist + wheel, runs twine check, and publishes to PyPI via OIDC Trusted Publishing (no API token stored as a secret).
  • Single-sourced version: vertex_proxy/__init__.py is now the one source of truth (hatchling dynamic version); pyproject.toml and the running app's version both read from it. Bumped to 0.2.0.
  • README: install section leads with pipx install vertex-proxy (plus uv tool install / uvx); from-source kept for development; run examples use the on-PATH vertex-proxy command.
  • CONTRIBUTING: new "Releasing" section with the one-time Trusted Publisher setup and per-release steps.
  • CHANGELOG: cut the 0.2.0 section.

Build verified locally: python -m build produces vertex_proxy-0.2.0 (sdist + wheel), twine check passes, app reports version 0.2.0. Suite: 22 passed, ruff clean.

Action required before this delivers value (maintainer)

This PR is intentionally not auto-merged because publishing depends on a one-time account action only you can do, and on release timing.

  1. Register the PyPI Trusted Publisher at https://pypi.org/manage/account/publishing/
    • PyPI project: vertex-proxy · Owner: prasadus92 · Repo: vertex-proxy · Workflow: release.yml · Environment: pypi
  2. (Recommended) Create a GitHub environment named pypi to gate the publish job.
  3. Merge this PR.
  4. Tag the release: git tag v0.2.0 && git push origin v0.2.0 → the workflow builds and publishes.

Note: the README advertises pipx install vertex-proxy, so it's best to merge and tag close together (the package won't resolve on PyPI until the first publish in step 4).

Make the proxy installable as a published package, not just from source:

- Add a tag-triggered Release workflow that builds the sdist + wheel,
  runs twine check, and publishes to PyPI via OIDC Trusted Publishing
  (no API token stored as a secret).
- Single-source the version from vertex_proxy/__init__.py via hatchling
  dynamic versioning; pyproject and the running app's version both read
  from it, so a release is a one-line bump. Bump to 0.2.0.
- README: lead the install section with pipx / uv / uvx, keep the
  from-source path for development; run examples use the on-PATH command.
- CONTRIBUTING: add a "Releasing" section with the one-time Trusted
  Publisher setup and the per-release steps.
- CHANGELOG: cut the 0.2.0 release section.
…tion

Align the package's PyPI keywords with the repo's GitHub topics for
discoverability, and note the OpenAI-compat route in the description
(it was already a first-class route, just not mentioned here).
@prasadus92 prasadus92 merged commit cfb0e40 into main Jun 2, 2026
2 checks passed
@prasadus92 prasadus92 deleted the feat/pypi-packaging branch June 2, 2026 14:03
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