Skip to content

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]
  1. Build - Create wheel and source distributions
  2. Validate - Check package integrity
  3. Authenticate - Use OIDC or API token
  4. Upload - Publish to PyPI
  5. 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

No tokens needed - authenticate directly with PyPI:

.releasio.toml
[publish]
trusted_publishing = true

Trusted Publishing Guide

API Token

Traditional token-based authentication:

- uses: mikeleppane/releasio@v2
  with:
    command: release
    pypi-token: ${{ secrets.PYPI_TOKEN }}
.releasio.toml
[publish]
trusted_publishing = false

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

Build Tools Guide


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)

[publish]
registry = "https://upload.pypi.org/legacy/"

TestPyPI

[publish]
registry = "https://test.pypi.org/legacy/"

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:

.releasio.toml
[publish]
enabled = false

Or use the CLI flag:

- uses: mikeleppane/releasio@v2
  with:
    command: release
    skip-publish: 'true'

Sections

  • PyPI Publishing


    Complete guide to publishing on PyPI

    PyPI Guide

  • Build Tools


    Configure uv, poetry, or pdm

    Build Tools


See Also