Skip to content

Upload Python Package #3

Upload Python Package

Upload Python Package #3

Workflow file for this run

# https://docs.pypi.org/trusted-publishers/using-a-publisher/
name: Upload Python Package
on:
release:
types: [published]
permissions:
contents: read
jobs:
pypi-publish:
runs-on: ubuntu-latest
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e
# Uncomment the following two lines to upload to TestPyPI
# with:
# repository-url: https://test.pypi.org/legacy/