Skip to content

Workflow file for this run

name: Publish Python distributions to PyPI
on:
release:
types: [published]
jobs:
build-n-publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
env:
ENV_NAME: publish
PYTHON: "3.10"
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON }}
- name: Install build
run: pip install build
- name: Build a binary wheel and a source tarball
run: |
python -m build
- name: Publish to PyPI
uses: pypa/[email protected]