Release 0.12.0 #34
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
# Publishes to PyPI upon creation of a release | |
name: Upload Package to PyPI | |
defaults: | |
run: | |
shell: bash | |
on: # Runs everytime a release is added to the repository | |
release: | |
types: [created] | |
jobs: | |
deploy: | |
name: ${{ matrix.os }} / ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: # only a single supported Python on latest ubuntu | |
os: [ubuntu-latest] | |
python-version: [3.9] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: '**/setup.py' | |
- name: Upgrade pip, setuptools, wheel, build and twine | |
run: python -m pip install --upgrade pip setuptools wheel build twine | |
- name: Build and check build | |
run: | | |
python -m build | |
twine check dist/* | |
- name: Publish | |
if: ${{ success() }} | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
twine upload dist/* |