Switch releases to tag-driven OIDC trusted publishing - #56
Merged
Conversation
Move release from a pyproject.toml path-filter trigger to git tags, and publish to PyPI via Trusted Publishing (OIDC) instead of a stored token. - Derive the package version from the git tag via hatch-vcs, so it no longer lives in pyproject.toml (removes version duplication and the manual bump PR step). - Trigger the Release workflow on `v*` tags; use `id-token: write` with `uv publish --trusted-publishing always` (no PYPI_TOKEN secret). - Create a GitHub Release with auto-generated notes on each release. - Drop the curl PyPI-exists check; tags are inherently idempotent. - Document the tag-based release flow in the README. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
shpyx has no runtime dependencies, but mypy/pytest/ruff/ty/pre-commit were listed under [project.dependencies], so they were installed for every end user of the package. Move them to a [dependency-groups] dev group, which uv still syncs by default for local dev and CI. The published wheel now has zero Requires-Dist. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Interactive helper that dogfoods shpyx to run the git commands. It: - verifies the working tree is clean and on `main`; - fetches and fast-forwards to `origin/main`; - reads the latest published version from PyPI and prompts for the next one (patch / minor / major); - offers to delete a pre-existing tag (e.g. from a failed release run) before recreating it; - creates and pushes the `v*` tag that triggers the Release workflow. The shebang uses `uv run`, so `./scripts/release.py` works without a manually activated virtualenv. Ignore T201 (print) under scripts/. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Remove scripts/release.py (and its scripts/* ruff ignore) and revert the README release section to the manual tag instructions. The script will land in a follow-up PR. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Reworks the release pipeline to follow current best practice, matching how projects like
watchfilesandruffrelease, and fixes the package's dependency metadata.