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
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 |