Currently, afterpython only supports GitHub Actions for CI/CD pipelines.
GitHub Actions¶
Inside .github/workflows/, you’ll find the following workflows:
ci.yml¶
Runs linting and formatting with ruff, type checking with ty (ap check), runs tests with pytest and builds the package and verifies it can be installed with uv build.
The ruff and ty checks only run if you set up afterpython/ruff.toml and afterpython/ty.toml respectively.
release.yml (optional)¶
Releases your package to PyPI and GitHub.
release.yml is only created if you agree to it during ap init.
See PyPI and GitHub Releases for more details.
deploy.yml¶
Deploys your project website to GitHub Pages.
dependabot.yml (optional)¶
Automatically updates GitHub Actions versions.
Branch Protection Rules¶
To create default branch protection rules:
install GitHub CLI
on macOS:
brew install ghon Linux: https://
github .com /cli /cli /releases on Windows: https://
cli .github .com/
authenticate with GitHub CLI by running
gh auth loginrun
ap init-branch-rules, this will create 3 branch protection rules (a ruleset namedafterpython-default) for yourmainbranch.No Force Pushes
Prevents overwriting history on the main branch.
No Branch Deletion
Protects the main branch from being deleted.
CI Status Checks (before the branch can be updated)
Requires the CI jobs
lint,test,buildandtypecheckto pass before any update (push or PR merge) is allowed.
You can view them in GitHub → Settings → Rules → Rulesets