Skip to content

Publish Python Package to PyPI #13

Publish Python Package to PyPI

Publish Python Package to PyPI #13

Workflow file for this run

name: Publish Python Package to PyPI
on:
workflow_dispatch:
jobs:
build-and-publish:
runs-on: ubuntu-latest
defaults:
run:
working-directory: python
steps:
- uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08
- name: Copy files
run: |
cp ../LICENSE .
- name: Set up Python
uses: actions/setup-python@2bd53f9a4d1dd1cd21eaffcc01a7b91a8e73ea4c
with:
python-version: '3.12'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build twine
- name: Build package
run: python -m build
- name: Check distribution
run: twine check dist/*
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{secrets.PYPI_API_TOKEN}}
run: python -m twine upload dist/* --verbose