Skip to content

0.0.28

0.0.28 #276

Workflow file for this run

on:
release:
types: [created]
push:
pull_request:
jobs:
pypi-publish:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Setup a local virtual environment (if no poetry.toml file)
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install the project dependencies
run: |
poetry self add "poetry-dynamic-versioning[plugin]"
poetry install
- name: run tests
run: poetry run pytest
- name: build release distributions
run: poetry build
- name: Publish release distributions to PyPI
if: "${{ github.event_name == 'release' }}"
uses: pypa/gh-action-pypi-publish@release/v1