feat: automate releases with semantic-release and publish to PyPI - #24
Merged
Merged
Conversation
|
🎉 This PR is included in version 1.3.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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
Same release pipeline as classroom and create-codegrade-assignment:
pr-title.yml, jobconventional title): PR titles must follow Conventional Commits, because with squash merging the title becomes the commit onmain.semantic-release.yml+.releaserc.json): on every push tomainthe next version is determined from the commit subjects, taggedvX.Y.Zand a GitHub release is created.pypi-publish.yml, reusable): when a new version is released,uv version <version> --frozen,uv buildanduv publish(withPYPI_TOKEN). The version is set at build time and not committed back tomain.release.yml: now only an escape hatch for manually pushedv*tags, calling the same publish workflow. Tags pushed by semantic-release (withGITHUB_TOKEN) do not trigger it, so nothing is published twice.This PR is titled
feat:on purpose: on merge, the first automated release will be v1.3.0 (the commits since v1.2.0 from #23 would otherwise only give a patch release).Testing
Workflow files parse; locally
uv version 1.3.0 --frozen+uv buildon a clean copy producescodestripper-1.3.0without changinguv.lock. The release and PyPI upload can only be verified after merge.