Skip to content

Commit 2292cbb

Browse files
committed
chore(release.yml): update Python version to 3.12 for compatibility with the project requirements
chore(release.yml): add steps to install Poetry and set up a local virtual environment for dependency management chore(release.yml): define a cache for the virtual environment based on the dependencies lock file to optimize workflow performance
1 parent 4ff8a43 commit 2292cbb

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,27 @@ on:
99
jobs:
1010
tests:
1111
uses: ./.github/workflows/tests.yml
12-
1312
release:
1413
runs-on: ubuntu-22.04
1514
needs: tests
1615
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-python@v4
18+
with:
19+
python-version: "3.12"
20+
- name: Install Poetry
21+
uses: abatilo/actions-poetry@v2
22+
- name: Setup a local virtual environment
23+
run: |
24+
poetry config virtualenvs.create true --local
25+
poetry config virtualenvs.in-project true --local
26+
- uses: actions/cache@v3
27+
name: Define a cache for the virtual environment based on the dependencies lock file
28+
with:
29+
path: ./.venv
30+
key: venv-${{ hashFiles('poetry.lock') }}
31+
- name: Install dependencies
32+
run: poetry install
1733
- name: Configure poetry for publishing
1834
run: poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
1935
- name: Publish package to PyPI

0 commit comments

Comments
 (0)