Skip to content

ci: Introduce PyPi Publisher workflow #1

ci: Introduce PyPi Publisher workflow

ci: Introduce PyPi Publisher workflow #1

Workflow file for this run

name: Publish Python Package to PyPI
on:
release:
types: [published]
workflow_dispatch:
# FIXME: remove this trigger after testing
pull_request:
branches:
- master
permissions:
id-token: write
jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment: pypi
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: "3.x"
- name: Build package
run: |
python -m pip install build
python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
with:
packages-dir: dist