Skip to content

feat: automate releases with semantic-release and publish to PyPI - #24

Merged
Bonajo merged 1 commit into
mainfrom
ci/semantic-release
Sep 21, 2026
Merged

Bonajo merged 1 commit into
mainfrom
ci/semantic-release

Conversation

@Bonajo

@Bonajo Bonajo commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Same release pipeline as classroom and create-codegrade-assignment:

  • PR title check (pr-title.yml, job conventional title): PR titles must follow Conventional Commits, because with squash merging the title becomes the commit on main.
  • Semantic release (semantic-release.yml + .releaserc.json): on every push to main the next version is determined from the commit subjects, tagged vX.Y.Z and a GitHub release is created.
  • PyPI publish (pypi-publish.yml, reusable): when a new version is released, uv version <version> --frozen, uv build and uv publish (with PYPI_TOKEN). The version is set at build time and not committed back to main.
  • release.yml: now only an escape hatch for manually pushed v* tags, calling the same publish workflow. Tags pushed by semantic-release (with GITHUB_TOKEN) do not trigger it, so nothing is published twice.
  • README: new "Releases" section with the PR title conventions.

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 build on a clean copy produces codestripper-1.3.0 without changing uv.lock. The release and PyPI upload can only be verified after merge.

@Bonajo
Bonajo merged commit 4531448 into main Sep 21, 2026
12 checks passed
@Bonajo
Bonajo deleted the ci/semantic-release branch September 21, 2026 09:13
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant