0.21.0 #35
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to PyPI | |
on: | |
release: | |
types: [published] | |
jobs: | |
build-and-publish: | |
name: Build and publish to PyPI | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
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.11 | |
- 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 package | |
run: python3 setup.py sdist bdist_wheel | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |