Skip to content

Publish package to PyPI #7

Publish package to PyPI

Publish package to PyPI #7

Workflow file for this run

name: Publish package to PyPI
on:
release:
types: [created]
workflow_dispatch:
permissions:
contents: read
jobs:
publish:
# disables this workflow from running in a repository that is not part of the indicated organization/user
if: github.repository_owner == 'afuetterer'
runs-on: ubuntu-22.04
environment: publish
permissions:
id-token: write
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.12'
cache: pip
- run: python -m pip install --constraint=.github/workflows/constraints.txt setuptools wheel build
- run: python -m build
- name: Publish package to Test PyPI
uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf # v1.8.11