ci: fix release pipeline and package metadata for PyPI publishing - #462
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
actions/checkoutpinshead_sha, leaving HEAD detached; python-semantic-release refuses to release outside a release branch (Detached HEAD state cannot match any release groups). Fixed withgit checkout -B mainbefore running semantic-release.version_tomlonly bumped the root workspacepyproject.toml;packages/pivotandpackages/pivot-tuiwould have published0.1.0forever. All three are now bumped in lock-step.uv buildat the workspace root doesn't build workspace members. Nowuv build --all-packages.chore(release):, but PSR's default commit message doesn't match, so release commits would pointlessly re-run the pipeline.commit_messagenow aligned.major_on_zero = false/allow_zero_version = truekeeps us in 0.x even ifBREAKING CHANGE:commits land.license = TBD/authors = Internal Teamreplaced 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 --printon 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 showsLicense-Expression: MIT, bundled LICENSE, author, URLsruff format --check,ruff check,basedpyrightclean; 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 tagsv0.1.0, creates the GitHub release, anduv publishuploads pivot and pivot-tui to PyPI via trusted publishing.sjawhar, repopivot, workflowrelease.yaml, environmentpypiNote: from this point on, every merge to main with
feat:/fix:commits auto-publishes a release.