Deployment Guide
This guide covers deployment of miu-mono packages to PyPI using Release-Please for automated versioning.Release Process
1
Conventional Commits
All commits must follow Conventional Commits format:
2
Release-Please Creates PR
When commits are pushed to
main:- GitHub Actions triggers Release-Please
- Creates separate PR for each package with changes
- Updates
pyproject.tomlversion andCHANGELOG.md
3
Review & Merge
Review the generated PR, verify version bumps and CHANGELOG accuracy, then merge.
4
PyPI Publication
After merge, GitHub creates a release which triggers automatic PyPI publication via OIDC trusted publishing.
Commit Types
| Type | Effect | Changelog |
|---|---|---|
feat | Minor bump | Visible |
fix | Patch bump | Visible |
perf | Patch bump | Visible |
refactor | Patch bump | Hidden |
docs | No bump | Hidden |
chore | No bump | Hidden |
Configuration Files
- Manifest
- Config
.release-please-manifest.jsonTracks current version for each package:GitHub Actions Workflows
Release-Please Workflow
File:.github/workflows/release-please.yml
- Triggers: Push to main, manual dispatch
- Jobs: Creates release PRs and GitHub releases
- Outputs: Per-package release flags and tag names
Publish Workflow
File:.github/workflows/release.yml
- Triggers: GitHub release event
- Features: Per-package matrix builds, OIDC trusted publishing
- No tokens needed - uses PyPI trusted publishing
PyPI Trusted Publishing
MIU uses OIDC trusted publishing - no API tokens stored in secrets:- GitHub Actions requests OIDC token
- Exchanges token with PyPI for temporary credentials
- Publishes without storing secrets
All 5 packages are configured with trusted publishers on PyPI.
Manual Build
Tag Format
With Release-Please configuration:Troubleshooting
Release PR Not Created
Release PR Not Created
Cause: No commits with conventional formatSolution: Ensure commits use
feat:, fix:, or perf: prefixesWrong Version Bump
Wrong Version Bump
Cause: Commit type doesn’t match intentSolution: Use correct type -
feat: for minor, fix: for patch, BREAKING CHANGE: for majorPyPI Publish Fails
PyPI Publish Fails
Cause: Trusted publisher not configured or version already publishedSolution:
- Verify trusted publisher in PyPI project settings
- Check workflow has
id-token: writepermission - Verify version isn’t already published