spec-kit icon indicating copy to clipboard operation
spec-kit copied to clipboard

feat: add PyPI publishing workflow and readme metadata

Open mnriem opened this issue 5 months ago • 1 comments

Summary

Adds infrastructure for publishing specify-cli to PyPI, addressing #2908.

Changes

  1. pyproject.toml — adds readme = "README.md" so PyPI displays the project description
  2. .github/workflows/publish-pypi.yml — new manual workflow for publishing to PyPI
  3. .github/workflows/release.yml — updates install instructions to prefer uv 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.toml version
  • Trusted publishers (OIDC) — no API tokens needed; uses id-token: write permission
  • Protected environment — requires a pypi GitHub environment for deployment gating
  • Two-job split — build (no elevated permissions) → publish (OIDC only)

Prerequisites Before First Use

  • [ ] Take ownership of the specify-cli PyPI project (pending attestation in #2908 ✅)
  • [ ] Create a pypi environment in repo settings
  • [ ] Configure trusted publisher on PyPI:
    • Owner: github
    • Repository: spec-kit
    • Workflow: publish-pypi.yml
    • Environment: pypi

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.

mnriem avatar Jun 10 '26 13:06 mnriem

Note that PyPI does not host image files, so relative image paths from your local repository (e.g., My Image) 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

youngjoel avatar Jun 10 '26 16:06 youngjoel