Skip to content

Workflow file for this run

name: "Publish Python 🐍 distributions 📦 to PyPI"
on:
release:
types:
- published
permissions:
contents: read
jobs:
build-n-publish-pypi:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
environment: production
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/[email protected]
- name: Set up Python3
uses: actions/[email protected]
with:
python-version: "3.x"
- name: Install packaging libraries
run: |
python -m pip install flit
- name: Build a binary wheel and a source tarball
run: |
python -m flit build
- name: Publish distribution 📦 to PyPI
uses: pypa/[email protected]