Skip to content

publish: PyPI release lane via Trusted Publishing; pipx install in Quick start - #9

Merged
SaMullinsJr merged 1 commit into
mainfrom
feat/pypi-publish
Aug 28, 2026
Merged

SaMullinsJr merged 1 commit into
mainfrom
feat/pypi-publish

Conversation

@SaMullinsJr

Copy link
Copy Markdown
Member

Implements the PyPI lever from the Codex discoverability review.

What's in it

  • .github/workflows/publish.yml: builds and uploads to PyPI on every published GitHub release, via Trusted Publishing (OIDC) — no API token is created or stored anywhere. The verify job re-runs the full repository gate first and refuses any tag whose name disagrees with the packaged version (PyPI versions are immutable, so a mismatched pair could never be recalled).
  • README Quick start now leads with pipx install baion-vault-method; the clone-based path stays for repo work.

Verified locally before this PR

  • python -m build: sdist + wheel built; twine check PASSED on both.
  • Clean-venv install from the wheel: bvm-lint --version → 0.3.0; tutorial vault lint → PASS, exit 0.
  • 74 unittest OK; REPOSITORY VERIFY PASS.

Operator setup required before the first upload works (one time, ~5 minutes)

  1. Create a PyPI account at pypi.org (2FA is mandatory there now).
  2. On PyPI: Account → Publishing → Add a new pending publisher: project baion-vault-method, owner BaionSyS, repository baion-vault-method, workflow publish.yml, environment pypi.
  3. In this repo: Settings → Environments → create pypi and add yourself as a required reviewer, so no upload ever runs without your approval click.
  4. Then trigger the workflow (re-run it on the v0.3.0 release, or use Run workflow) and approve the pypi environment gate.

Until step 2 is done the publish job will simply fail at upload with an OIDC trust error; nothing partial can land.

…ick start

The package was previously reachable only by cloning the repository.
pyproject.toml already declared a complete, dependency-free package with
the bvm-lint entry point, so the whole lane is a workflow plus two README
lines.

Publishing uses PyPI Trusted Publishing (OIDC): no API token exists in
any secret store. PyPI is configured to trust this repo + publish.yml +
the pypi environment; the environment carries a required-reviewer rule
so an upload cannot happen without an explicit approval click, even
after a release is published. The verify job re-runs the full repo gate
and refuses a tag whose name disagrees with the packaged version, since
PyPI versions are immutable once uploaded.

Wheel verified locally: clean-venv install, bvm-lint --version 0.3.0,
tutorial vault PASS exit 0, twine check PASSED on sdist and wheel.
@SaMullinsJr
SaMullinsJr merged commit b49b064 into main Aug 28, 2026
6 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