Skip to content

0.20.2

0.20.2 #33

Workflow file for this run

name: Publish to PyPI
on:
release:
types: [published]
jobs:
build-and-publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
# Setup Python (faster than using Python container)
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
# Upgrade pip
python3 -m pip install --upgrade pip
# Install build deps
python3 -m pip install setuptools wheel
# If requirements.txt exists, install from it
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# Install the package from setup.py
python3 setup.py install
- name: Build and publish to PyPI
run: |
python3 setup.py sdist bdist_wheel
pipx run twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}