Skip to content

Commit cf331af

Browse files
authored
Merge pull request #1 from d-chris/develop
Refactor actions to use environment variables for versions
2 parents 823f1eb + 08c9c32 commit cf331af

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: poetry-publish
22
on:
33
release:
44
types: [released]
5+
env:
6+
PYTHON_VERSION: "3.13"
7+
POETRY_VERSION: "1.8.5"
58
jobs:
69
publish:
710
runs-on: ubuntu-latest
@@ -10,9 +13,9 @@ jobs:
1013
- name: Set up Python
1114
uses: actions/setup-python@v5
1215
with:
13-
python-version: 3.13
16+
python-version: ${{ env.PYTHON_VERSION }}
1417
- name: Install poetry
15-
run: pipx install poetry==1.8.5 --python 3.13
18+
run: pipx install poetry==${{ env.POETRY_VERSION }} --python ${{ env.PYTHON_VERSION }}
1619
- name: Install dependencies
1720
run: |
1821
poetry install --only main,docs

.github/workflows/pytest.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ on:
33
workflow_dispatch:
44
pull_request:
55
branches: ["main"]
6+
env:
7+
POETRY_VERSION: "1.8.5"
68
jobs:
79
test:
810
runs-on: ${{ matrix.os }}
@@ -18,7 +20,7 @@ jobs:
1820
with:
1921
python-version: ${{ matrix.python-version }}
2022
- name: Install poetry
21-
run: pipx install poetry==1.8.5 --python ${{ matrix.python-version }}
23+
run: pipx install poetry==${{ env.POETRY_VERSION }} --python ${{ matrix.python-version }}
2224
- name: Install dependencies
2325
run: |
2426
poetry install --only main,test --all-extras

0 commit comments

Comments
 (0)