Skip to content

Workflow file for this run

name: Build wheels and sdist and upload to PyPi
on:
workflow_dispatch:
release:
types:
- published
# push:
# branches:
# toml_setup_updates
# For debugging.
jobs:
build_sdist:
name: Build platform-independent wheel and sdist and upload to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install -U pip setuptools wheel build
pip install -U -r requirements.txt
- name: Build wheel and sdist
run: |
python -m build
- name: Upload distributions as artifact
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://upload.pypi.org/legacy/
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
verbose: true