Skip to content

Workflow file for this run

name: Publish Python 🐍 distributions 📦 to PyPI
on:
release:
types:
- published
jobs:
build-n-publish-pypi:
name: Build and publish Python 🐍 distributions 📦 to PyPI
environment: production
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- name: Set up Python3
uses: actions/setup-python@v4.7.1
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/gh-action-pypi-publish@v1.8.11