Skip to content

Deploy Python Package to PyPI #10

Deploy Python Package to PyPI

Deploy Python Package to PyPI #10

Workflow file for this run

# SPDX-FileCopyrightText: 2024 Thomas Breitner
#
# SPDX-License-Identifier: MIT
name: Deploy Python Package to PyPI
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
on:
push:
tags:
- "v*"
workflow_run:
workflows: ["Automated CalVer Tagging"]
types: [completed]
permissions:
contents: write
pages: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
- name: Build package
run: |
python -m pip install --upgrade .[pypi]
python -m build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}