Skip to content
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
name: Publish Release
name: Build and Publish wheels to PyPI

on:
# allows running workflows manually
workflow_dispatch:

release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
environment:
name: pypi
permissions:
id-token: write

steps:
- name: Checkout code
Expand All @@ -24,9 +31,10 @@ jobs:
python -m pip install --upgrade pip
pip install build

- name: Build and package
- name: Build package
run: |
python -m build
python -m build -w

- name: Publish a Python distribution to PyPI
- name: Publish package distributions to PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1