ci: automate releases on merge to main#32
Merged
Merged
Conversation
Add GitHub Actions to replace the manual 'just publish' flow: - ci.yml: run unit tests on every PR and push to main (py3.9 + 3.12). - release.yml: on merge to main, run python-semantic-release to compute the next version from Conventional Commit messages, bump pyproject.toml, tag, create a GitHub Release, and publish to PyPI via Trusted Publishing (OIDC). Also declare an explicit [build-system] (setuptools) which was missing. Versioning is anchored by a baseline v1.0.1 tag matching the current PyPI release; the 8 unreleased PRs on main will publish as 1.1.0 on first run.
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
Replaces the manual `just publish` flow with GitHub Actions so releases happen automatically on merge to main. Jake (and anyone else) no longer needs to know the release dance.
Workflows
Other
Why now
main currently declares `version = "1.0.1"` but PyPI already has 1.0.1 — and there are 8 unreleased PRs sitting behind that already-used version number (row-cap fix, SQL compile, Bearer auth, etc.). Manual releases had drifted. Automation fixes this.
PyPI Trusted Publishing must be configured once, or the publish step will fail:
What happens on merge
semantic-release will compute 1.1.0 (the 8 unreleased PRs include `feat:` commits) and publish it to PyPI automatically.