Repository navigation
Publish to PyPI on tag, and release 0.5.1 - #86
Merged
Merged
Conversation
Add a Release workflow that builds the sdist and wheel with uv and uploads them to PyPI through OIDC Trusted Publishing when a v* tag is pushed. No API token is stored in the repo: PyPI is configured to trust this repository's `pypi` environment and each run mints a short-lived credential. A guard fails the release if the git tag disagrees with the pyproject version, and `twine check` gates on the metadata rendering. README now leads with `uv tool install samplerdisc` (plus uvx/pipx/pip), keeping the git+ install as the unreleased-main option, and gains a PyPI version badge. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bump to 0.5.1 and record the PyPI availability in the changelog. No change to the conversion; this exists so that merging the release workflow leaves `main` immediately taggable for the debut publish. Co-Authored-By: Claude Opus 4.8 <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 this does
Makes
samplerdiscinstallable from PyPI (uv tool install samplerdisc,uvx samplerdisc,pipx/pip) and adds the automation that keeps it there. The conversion code is untouched — this is distribution only.The release path
A new
Releaseworkflow (.github/workflows/release.yml) fires on avX.Y.Ztag and, in two jobs:uv build, runstwine check, and uploads the artifacts. A guard fails the run if the git tag disagrees with the packaged version (uv version --short), the same "enforced, not remembered" reflex asci.yml's no-media check — a tag can never publish the wrong number under the right name.pypa/gh-action-pypi-publish, gated on apypiGitHub environment restricted tov*tags. No API token lives in the repo; each run mints a short-lived credential.A release is therefore just
git tag vX.Y.Z && git push --tags.Why no token
This repo is public. A long-lived PyPI token stored as a secret is the thing that leaks; Trusted Publishing removes it entirely by trusting this repository's
pypienvironment to mint a per-run OIDC credential. The environment'sv*-tag rule means only a tagged release can request it.Packaging notes
The wheel ships only the
samplerdisc/package — verified thatout/,tests/, andscripts/are excluded.twine checkpasses on both artifacts. The existing metadata inpyproject.toml(classifiers, keywords, license, URLs, console entry point) was already release-ready and is unchanged.What it deliberately does not claim
v0.5.0tag will not publish — that commit predatesrelease.yml. This is why the PR bumps to 0.5.1, so merging leavesmainimmediately taggable for the debut publish (which, being a pending publisher, is what creates the project on PyPI).After merge
git tag v0.5.1 && git push origin v0.5.1Releaserun; the first success creates the project and converts the pending publisher to a normal one.🤖 Generated with Claude Code