Skip to content

Release

Release #101

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.11
- run: pip3 install poetry
- run: poetry install --with test
- run: poetry run pytest
publish-pypi:
runs-on: ubuntu-latest
needs: tests
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Set version
run: sed -i "s~version =.*~version = '$(echo -n \"${{ github.ref }}\" | sed "s/refs\/tags\///"),~g" pyproject.toml
- run: pip3 install --user poetry
- run: poetry build
- run: poetry publish
env:
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_USER }}
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}