spec-kit
spec-kit copied to clipboard
feat: add PyPI publishing workflow and readme metadata
Summary
Adds infrastructure for publishing specify-cli to PyPI, addressing #2908.
Changes
pyproject.toml— addsreadme = "README.md"so PyPI displays the project description.github/workflows/publish-pypi.yml— new manual workflow for publishing to PyPI.github/workflows/release.yml— updates install instructions to preferuv tool install specify-cli@latest
Publish Workflow Design
- Manual trigger (
workflow_dispatch) — run after the release workflow completes - Tag input — specify which release tag to publish (e.g.,
v0.10.1) - Validation — verifies tag format and that it matches
pyproject.tomlversion - Trusted publishers (OIDC) — no API tokens needed; uses
id-token: writepermission - Protected environment — requires a
pypiGitHub environment for deployment gating - Two-job split — build (no elevated permissions) → publish (OIDC only)
Prerequisites Before First Use
- [ ] Take ownership of the
specify-cliPyPI project (pending attestation in #2908 ✅) - [ ] Create a
pypienvironment in repo settings - [ ] Configure trusted publisher on PyPI:
- Owner:
github - Repository:
spec-kit - Workflow:
publish-pypi.yml - Environment:
pypi
- Owner:
Testing
This workflow won't run until manually triggered with a valid tag, so it's safe to merge ahead of the PyPI ownership transfer.
Note that PyPI does not host image files, so relative image paths from your local repository (e.g.,
) will appear broken. To fix this, you must change your image URLs to absolute paths pointing to an external file host, such as the ://githubusercontent.com URL for your repository.
You can see this here: https://pypi.org/project/specify-cli/ , where the Spec Kit logo isn't rendered.
https://github.com/pypi/warehouse/issues/5246