Skip to content

Commit aa396dd

Browse files
committed
Add python-version file
1 parent 195c0ff commit aa396dd

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

.github/workflows/dependencies.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ concurrency:
2020
group: ${{ github.workflow }}
2121

2222
env:
23-
# Note: the last version in this list is used for docs requirements, so update it in other workflows too!
23+
# Note: the last version in this list is used to for sphinx-docs and pypi-releases
2424
PYTHON_VERSIONS: |
2525
3.9
2626
3.10
@@ -49,7 +49,8 @@ jobs:
4949
python$VER -m piptools compile --upgrade --no-annotate -o examples-requirements-py$VER.txt --all-extras ../pyproject.toml examples.in
5050
python$VER -m piptools compile --upgrade --no-annotate -o tests-requirements-py$VER.txt examples-requirements-py$VER.txt tests.in
5151
done
52-
# use last version for docs
52+
# use last version for docs and releases
53+
echo "$VER" > .python-version
5354
python$VER -m piptools compile --upgrade --no-annotate -o docs-requirements.txt examples-requirements-py$VER.txt docs.in
5455
5556
- name: Open PR

.github/workflows/release.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@v4
1313
- uses: actions/setup-python@v5
1414
with:
15-
python-version: '3.12'
15+
python-version-file: 'requirements/.python-version'
1616
- run: |
1717
# Assert git and python versions match
1818
pip install -e .
@@ -32,7 +32,7 @@ jobs:
3232
- uses: actions/checkout@v4
3333
- uses: actions/setup-python@v5
3434
with:
35-
python-version: '3.12'
35+
python-version-file: 'requirements/.python-version'
3636
- run: |
3737
pip install build
3838
- name: Build
@@ -70,7 +70,7 @@ jobs:
7070
fetch-depth: 0
7171
- uses: actions/setup-python@v5
7272
with:
73-
python-version: '3.12'
73+
python-version-file: 'requirements/.python-version'
7474
- name: Install dependencies
7575
run: |
7676
pip install -r requirements/docs-requirements.txt
@@ -108,7 +108,7 @@ jobs:
108108
- uses: actions/checkout@v4
109109
- uses: actions/setup-python@v5
110110
with:
111-
python-version: '3.12'
111+
python-version-file: 'requirements/.python-version'
112112
- run: |
113113
pip install build
114114
- name: Build

.github/workflows/release_trigger.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
ssh-key: ${{ secrets.RELEASE_TRIGGER_WORKFLOW_KEY }}
2323
- uses: actions/setup-python@v5
2424
with:
25-
python-version: '3.12'
25+
python-version-file: 'requirements/.python-version'
2626
- run: |
2727
# Determine version
2828
pip install -e .

.github/workflows/test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- uses: actions/checkout@v4
3636
- uses: actions/setup-python@v5
3737
with:
38-
python-version: '3.12'
38+
python-version-file: 'requirements/.python-version'
3939
- name: Install dependencies
4040
run: |
4141
pip install -r requirements/docs-requirements.txt
@@ -50,7 +50,7 @@ jobs:
5050
- uses: actions/checkout@v4
5151
- uses: actions/setup-python@v5
5252
with:
53-
python-version: '3.12'
53+
python-version-file: 'requirements/.python-version'
5454
- uses: pre-commit/[email protected]
5555
with:
5656
extra_args: --all-files --hook-stage=manual
@@ -64,7 +64,7 @@ jobs:
6464
# fetch-depth: 0
6565
# - uses: actions/setup-python@v5
6666
# with:
67-
# python-version: '3.12'
67+
# python-version-file: 'requirements/.python-version'
6868
# - run: |
6969
# # Determine version
7070
# pip install -e .

requirements/.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

0 commit comments

Comments
 (0)