diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3a3a97b..d9eb372 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,24 @@ jobs: # IMPORTANT: this permission is mandatory for trusted publishing id-token: write steps: - # retrieve your distributions here + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: "3.12" + - name: Run image + 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 install --with test + - name: Build package distributions + run: poetry build - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1