Skip to content

Merge pull request #32 from LorenzLamm/add_automated_pypi_deployment #1

Merge pull request #32 from LorenzLamm/add_automated_pypi_deployment

Merge pull request #32 from LorenzLamm/add_automated_pypi_deployment #1

Workflow file for this run

name: Publish to PyPI
on:
push:
tags:
- 'v*.*.*' # Matches tags like v0.0.1, v1.2.3, etc.
jobs:
publish:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
# Setup Python
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
# Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
# Build the package
- name: Build the package
run: python -m build
# Publish to PyPI
- name: Publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: python -m twine upload dist/*