Skip to content

0.10.0 (2025-01-06) #15

0.10.0 (2025-01-06)

0.10.0 (2025-01-06) #15

Workflow file for this run

# This workflow uploads a Python Package using Twine when a release is published.
# For more information, see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: Deploy
on:
release:
types: [published]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Pkg + Dependencies
run: |
python -m pip install .[dev]
- name: Test with pytest
run: |
python -m pytest -ra
- name: Build wheels pkg
run: |
python setup.py bdist_wheel
deploy:
needs: tests # only run if previous step succeeds
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Pkg + Dependencies
run: |
python -m pip install .[dev]
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
- name: Build wheels pkg
run: |
python setup.py sdist bdist_wheel
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true