Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Version Bumping

ap bump increments your project version using uv’s uv version --bump under the hood, then commits the change (bump: version A → B) and tags it (e.g. v0.1.0). Bumps to a stable version also add the new release’s section to CHANGELOG.md in the same commit, see Changelog.

Commands


PyPI and GitHub Releases

If you agreed to create the release workflow during ap init, afterpython creates a GitHub Actions workflow (.github/workflows/release.yml) that publishes your package to PyPI and creates GitHub releases. The GitHub releases’ notes are generated by git-cliff, see Release Notes.

PyPI Setup

To enable trusted publishing on PyPI:

  1. Go to PyPI and navigate to your project

  2. Click Manage → Publishing (left sidebar)

  3. Under the GitHub tab, fill in:

    • Owner: Your GitHub username or organization name

    • Repository: Your repository name

    • Workflow name: release.yml

Releasing Your Package

ap release manually pushes the git tag created by ap bump to GitHub, which triggers the release.yml workflow. This command is unnecessary if you’ve already successfully run ap bump --release.

Commands:


Semantic Release 🚧


Changelog

afterpython generates CHANGELOG.md from your commit messages with git-cliff, configured in afterpython/cliff.toml. Commits are grouped by their commit type (e.g. Features, Bug Fixes), and commits that don’t follow the Conventional Commits format are left out. If your branch tracks a GitHub remote, each version links to its compare page on GitHub (e.g. v0.3.19...v0.4.0) and (#123) in a commit message links to the pull request.

ap init creates afterpython/cliff.toml from git-cliff’s default configuration if you agree to it, or run ap init cliff later. Edit it to change what the changelog looks like, see git-cliff’s configuration docs.

Keep all your git-cliff settings in afterpython/cliff.toml, not in pyproject.toml ([tool.git-cliff]) or a cliff.toml at the project root. If ap init finds an existing git-cliff config there, it skips the git-cliff setup; remove it and run ap init cliff to set it up again.

Commands

Updating the Changelog

Every ap bump to a stable version (e.g. 0.3.19 → 0.3.20, 0.4.0rc1 → 0.4.0) adds the new release’s section to the top of CHANGELOG.md and commits it together with the version change, so the tagged commit already contains its own release notes.

Release Notes

The release workflow uses git-cliff to write the notes of each GitHub release:

Release notes are generated from git history, not from CHANGELOG.md, so manual edits to CHANGELOG.md don’t show up in them.