Releasing¶
Versions and the changelog come from your commit messages: on every merge to main, python-semantic-release reads the Conventional Commits, bumps the version, updates CHANGELOG.md, tags, and publishes a GitHub release. feat: bumps the minor version, fix: the patch; chore:, docs:, ci: and test: release nothing.
One-time setup per repository:
- Create or reuse a GitHub App with Contents: Read and write permission (organizations typically share one release bot) and grant it access to the repository.
- Provide the secrets
RELEASE_APP_IDandRELEASE_APP_PRIVATE_KEY, as repository secrets or inherited organization secrets. - Add a ruleset protecting
mainand list the App as allowed to bypass it, so the release commit and tag can be pushed while everyone else goes through pull requests.
Publishing to PyPI is optional and off by default. Repositories that enable it during make init publish via trusted publishing (OIDC, no token secret); configure the trusted publisher on PyPI once, pointing at the release workflow.