Skip to content

v0.5.0

v0.5.0 #7

Workflow file for this run

# This workflow will publish new releases after running tests
name: Publish Python package
on:
release:
types: [created]
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.10", "3.11"]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- run: poetry install
- run: poetry run pytest tests
publish:
runs-on: ubuntu-latest
needs: [tests]
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'poetry'
- run: poetry install
- run: poetry build
- name: Publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: poetry publish