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:
id-token: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- uses: actions/checkout@v3
- name: Set up Python3
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install packaging libraries
run: |
python -m pip install build setuptools
- name: Build a binary wheel and a source tarball
run: |
python -m build --sdist --wheel .
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1