# DERIVED FROM: https://realpython.com/github-actions-python # human readable name (shows up on Github) name: Deploy code to PyPI. on: release: types: [published] workflow_call: workflow_dispatch: jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.13" - name: Install dependencies run: | python -m pip install --upgrade pip python -m pip install build - name: Build package run: python -m build - name: Upload to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }}