Add manually-triggered release workflow (version bump + PyPI publish) - #19
Merged
Conversation
New workflow_dispatch workflow (bump_type: patch/minor/major) runs the test suite as a gate, bumps the version via bumpversion, pushes the resulting commit and tag, builds sdist+wheel, publishes to PyPI via Trusted Publishing (OIDC, no stored API token), and creates a GitHub Release for the new tag. This fully replaces the local `python setup.py upload` path (twine + manual bumpversion + manual git push), which is removed from setup.py along with its now-unused imports and the read_current_version() helper that only it called. Refs #18 Co-Authored-By: Claude Sonnet 5 <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.
Summary
.github/workflows/release.yml, triggered manually viaworkflow_dispatchwith abump_typeinput (patch/minor/major, defaultpatch)pytestas a gate before doing anything irreversiblebumpversion <bump_type>bumps.bumpversion.cfg, commits ("Bump version: X -> Y"), and tags — pushed back tomasterpython -m build, publishes to PyPI via Trusted Publishing (OIDC — no API token stored as a secret)python setup.py uploadcommand (UploadCommandinsetup.py) and its now-unused imports/helper, since this workflow fully replaces itBefore merging / first run
gbfs-clientPyPI project page, under Publishing → Trusted Publishers, add a trusted publisher pointing at this repo (jakehadar/bikeshare-client-python) and workflow filename (release.yml). Without this, the publish step will fail authentication.master).environment: releaseto the job — optional, but lets you add required reviewers on that environment (Settings → Environments) as an extra manual approval gate before a publish actually runs, since this is the one workflow in the repo that does something irreversible.Test plan
setup.pystill installs, tests pass, and both sdist/wheel build cleanly after removingUploadCommand(fresh venv, Python 3.13)bumpversion patchbehaves as expected (0.1.8 -> 0.1.9, correct commit message and tag) in an isolated throwaway clone — didn't touch this repo's real tagsRefs #18
🤖 Generated with Claude Code