Release Process¶
This document outlines the steps to release a new version of azure-functions-openapi to PyPI and update the changelog using the existing Makefile and Hatch-based workflows.
๐งพ Step 1: Bump Version and Generate Changelog¶
Use Makefile targets to bump the version and update the changelog:
make release-patch # Patch release (e.g., v0.10.0 โ v0.10.1)
make release-minor # Minor release (e.g., v0.10.1 โ v0.11.0)
make release-major # Major release (e.g., v0.11.0 โ v1.0.0)
Each command will:
- Update the version in
src/azure_functions_openapi/__init__.py - Generate or update
CHANGELOG.mdviagit-cliff - Commit the version bump and changelog
- Create a Git tag (e.g.,
v0.11.0) and push tomain
Make sure your
mainbranch is up-to-date before running these commands.
๐ Changelog Generation¶
The changelog is generated automatically by git-cliff from conventional commit messages.
Configuration¶
cliff.tomlโ defines commit grouping, emoji categories, and output formatMakefileโmake changelogrunsgit-cliff -o CHANGELOG.md
Commit Message Convention¶
Follow Conventional Commits for proper changelog grouping:
| Prefix | Changelog Category |
|---|---|
feat: |
๐ Features |
fix: |
๐ Bug Fixes |
docs: |
๐ Documentation |
refactor: |
๐ Refactor |
style: |
๐จ Styling |
test: |
๐งช Testing |
perf: |
โก Performance |
ci: / chore: |
โ๏ธ Miscellaneous Tasks |
build: |
๐ผ Other |
Use scopes for more context: fix(openapi): preserve explicit 200 response
Manual Changelog Regeneration¶
make changelog # Regenerate CHANGELOG.md from all tags
make commit-changelog # Stage and commit the updated changelog
๐ฆ Step 2: Build and Test the Package¶
make build
To test the local build:
pip install dist/azure_functions_openapi-<version>-py3-none-any.whl
๐ Step 3: Publish to PyPI¶
make publish-pypi
- Uses
hatch publishunder the hood - Relies on
~/.pypircfor authentication (must contain PyPI token)
๐ Step 4: (Optional) Publish to TestPyPI¶
make publish-test
To install from TestPyPI:
pip install --index-url https://test.pypi.org/simple/ azure-functions-openapi
โ Summary of Makefile Commands¶
| Task | Command |
|---|---|
| Version bump + changelog | make release-patch / release-minor / release-major |
| Build distributions | make build |
| Publish to PyPI | make publish-pypi |
| Publish to TestPyPI | make publish-test |
| Regenerate changelog only | make changelog |
| Show current version | make version |