Publishing¶
Publish your Python packages to PyPI and other registries.
Overview¶
releasio automates the entire publishing workflow:
%%{init: {'theme': 'neutral'}}%%
graph LR
A[Build] --> B[Validate]
B --> C[Authenticate]
C --> D[Upload]
D --> E[Verify]
- Build - Create wheel and source distributions
- Validate - Check package integrity
- Authenticate - Use OIDC or API token
- Upload - Publish to PyPI
- Verify - Confirm successful upload
Quick Start¶
Minimal Setup¶
releasio works with zero publishing configuration:
.github/workflows/release.yml
permissions:
id-token: write # For trusted publishing
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: mikeleppane/releasio@v2
with:
command: release
dry-run: 'false'
github-token: ${{ secrets.GITHUB_TOKEN }}
This uses:
- uv as the default build tool
- Trusted publishing (OIDC) for authentication
- PyPI as the default registry
Authentication Methods¶
Trusted Publishing (Recommended)¶
No tokens needed - authenticate directly with PyPI:
API Token¶
Traditional token-based authentication:
Build Tools¶
releasio supports multiple Python build tools:
| Tool | Config | Build Command | Publish Command |
|---|---|---|---|
| uv | Default | uv build |
uv publish |
| poetry | tool = "poetry" |
poetry build |
poetry publish |
| pdm | tool = "pdm" |
pdm build |
pdm publish |
Configuration¶
Basic Options¶
.releasio.toml
[publish]
# Build tool: uv, poetry, pdm
tool = "uv"
# Enable/disable PyPI publishing
enabled = true
# Use trusted publishing (OIDC)
trusted_publishing = true
Full Options¶
.releasio.toml
[publish]
tool = "uv"
enabled = true
trusted_publishing = true
# Validate package before publishing
validate_before_publish = true
# Custom registry (TestPyPI, private registry)
registry = "https://upload.pypi.org/legacy/"
Registries¶
PyPI (Default)¶
TestPyPI¶
Private Registry¶
[publish]
registry = "https://pypi.mycompany.com/simple/"
trusted_publishing = false # Usually need token for private
Skip Publishing¶
To only create GitHub releases without PyPI:
Or use the CLI flag:
Sections¶
-
PyPI Publishing
Complete guide to publishing on PyPI
-
Build Tools
Configure uv, poetry, or pdm
See Also¶
- Trusted Publishing - OIDC authentication
- Release Assets - Upload to GitHub releases
- Full Workflow - Complete CI/CD setup