Skip to content

Publish Python 🐍 distributions 📦 to PyPI #2

Publish Python 🐍 distributions 📦 to PyPI

Publish Python 🐍 distributions 📦 to PyPI #2

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
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python3
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install packaging libraries
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build a binary wheel and a source tarball
run: |
python -m build
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1