Skip to content

Workflow file for this run

name: Publish new release to pypi
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry install
poetry add pytest
- name: Test
run: poetry run pytest tests
- name: Build
run: |
poetry version $(git describe --tags --abbrev=0)
poetry build
- name: Publish
run: poetry publish