Skip to content

ci: fix release pipeline and package metadata for PyPI publishing - #462

Merged
sjawhar merged 1 commit into
mainfrom
ci/fix-release-pipeline
Jul 13, 2026
Merged

ci: fix release pipeline and package metadata for PyPI publishing#462
sjawhar merged 1 commit into
mainfrom
ci/fix-release-pipeline

Conversation

@legion-implementer

Copy link
Copy Markdown
Contributor

Why

We now own https://pypi.org/project/pivot/ 🎉 — but the Release workflow has never succeeded (every run since February failed), so no version was ever bumped or published. This PR fixes every bug blocking the first automated release.

Bugs fixed

  1. Detached HEAD (the actual CI failure)actions/checkout pins head_sha, leaving HEAD detached; python-semantic-release refuses to release outside a release branch (Detached HEAD state cannot match any release groups). Fixed with git checkout -B main before running semantic-release.
  2. Version bumps never reached the packagesversion_toml only bumped the root workspace pyproject.toml; packages/pivot and packages/pivot-tui would have published 0.1.0 forever. All three are now bumped in lock-step.
  3. Nothing publishable was built — bare uv build at the workspace root doesn't build workspace members. Now uv build --all-packages.
  4. Release-commit guard mismatch — the workflow skips commits starting with chore(release):, but PSR's default commit message doesn't match, so release commits would pointlessly re-run the pipeline. commit_message now aligned.
  5. Pre-alpha versioningmajor_on_zero = false / allow_zero_version = true keeps us in 0.x even if BREAKING CHANGE: commits land.
  6. Unpublishable metadatalicense = TBD / authors = Internal Team replaced with MIT + real author; added LICENSE files, per-package READMEs (PyPI long description), [project.urls], and classifiers to both packages. pivot-tui had no license/author/readme metadata at all.

Verification

  • semantic-release --noop version --print on a clone of this branch computes 0.1.0 (matches current pyproject version; PyPI already has 0.0.1/0.0.2 from the previous owner, so this is a valid next version)
  • uv build --all-packages → 4 artifacts; twine check dist/* → all PASSED; wheel METADATA shows License-Expression: MIT, bundled LICENSE, author, URLs
  • ruff format --check, ruff check, basedpyright clean; full test suite passes (3570 + 428 tests)

After merge

Merging this (contains no feat:/fix:, but the entire unreleased history counts) triggers Tests → Release → semantic-release tags v0.1.0, creates the GitHub release, and uv publish uploads pivot and pivot-tui to PyPI via trusted publishing.

⚠️ Requires PyPI-side setup before merge (@sjawhar):

  • pivot: Manage → Publishing → add GitHub publisher: owner sjawhar, repo pivot, workflow release.yaml, environment pypi
  • pivot-tui: account → Publishing → add pending publisher with the same settings (first upload creates the project)

Note: from this point on, every merge to main with feat:/fix: commits auto-publishes a release.

The Release workflow has never succeeded. This fixes all the bugs blocking
the first PyPI release:

- release.yaml: checkout leaves HEAD detached at head_sha, but
  python-semantic-release requires being on the main release branch.
  Add `git checkout -B main` before running semantic-release.
- semantic-release config: version_toml only bumped the root workspace
  pyproject.toml, never the published packages. Now bumps all three in
  lock-step. build_command now uses `uv build --all-packages` (bare
  `uv build` at the workspace root builds nothing publishable).
- Align commit_message with the workflow's chore(release) guard so
  release commits don't re-trigger the pipeline.
- Set major_on_zero=false / allow_zero_version=true to stay in 0.x
  during pre-alpha even if breaking changes land.
- Package metadata: replace license TBD / Internal Team with MIT +
  Sami Jawhar, add LICENSE files, per-package READMEs (PyPI long
  description), project URLs, and classifiers to both packages.
- Ignore .omo/ session state.

Verified locally: semantic-release --noop computes 0.1.0,
uv build --all-packages + twine check pass on all four artifacts.
@sjawhar
sjawhar merged commit b044fbc into main Jul 13, 2026
4 checks passed
@sjawhar
sjawhar deleted the ci/fix-release-pipeline branch July 13, 2026 18:08
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