Skip to content

Publish distribution to PyPI #1

Publish distribution to PyPI

Publish distribution to PyPI #1

Workflow file for this run

name: Publish distribution to PyPI
on:
release:
types: [published]
permissions:
contents: read
jobs:
build-and-publish:
name: Build and publish distribution to PyPi
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.x'
- name: Install wheel
run: python -m pip install --user --upgrade wheel
- name: Install twine
run: python -m pip install --user --upgrade twine
- name: Install setuptools
run: python -m pip install --user --upgrade setuptools
- name: Build a binary wheel and a source tarball
run: python setup.py sdist bdist_wheel
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # release/v1