1
- # setup-python V3
1
+ # setup-python v4
2
2
3
3
<p align =" left " >
4
4
<a href =" https://github.com/actions/setup-python " ><img alt =" GitHub Actions status " src =" https://github.com/actions/setup-python/workflows/Main%20workflow/badge.svg " ></a >
30
30
``` yaml
31
31
steps :
32
32
- uses : actions/checkout@v3
33
- - uses : actions/setup-python@v3
33
+ - uses : actions/setup-python@v4
34
34
with :
35
35
python-version : ' 3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
36
36
architecture : ' x64' # optional x64 or x86. Defaults to x64 if not specified
40
40
Read Python version from file:
41
41
` ` ` yaml
42
42
steps :
43
- - uses : actions/checkout@v2
44
- - uses : actions/setup-python@v2
43
+ - uses : actions/checkout@v3
44
+ - uses : actions/setup-python@v4
45
45
with :
46
46
python-version-file : ' .python-version' # Read python version from a file
47
47
architecture : ' x64' # optional x64 or x86. Defaults to x64 if not specified
60
60
steps :
61
61
- uses : actions/checkout@v3
62
62
- name : Set up Python
63
- uses : actions/setup-python@v3
63
+ uses : actions/setup-python@v4
64
64
with :
65
65
python-version : ${{ matrix.python-version }}
66
66
architecture : x64
84
84
steps :
85
85
- uses : actions/checkout@v3
86
86
- name : Set up Python
87
- uses : actions/setup-python@v3
87
+ uses : actions/setup-python@v4
88
88
with :
89
89
python-version : ${{ matrix.python-version }}
90
90
- name : Display Python version
@@ -102,7 +102,7 @@ jobs:
102
102
python-version : ['3.7.4', '3.8', '3.9', '3.10']
103
103
steps :
104
104
- uses : actions/checkout@v3
105
- - uses : actions/setup-python@v3
105
+ - uses : actions/setup-python@v4
106
106
with :
107
107
python-version : ${{ matrix.python-version }}
108
108
- run : python my_script.py
@@ -112,7 +112,7 @@ Download and set up an accurate pre-release version of Python:
112
112
` ` ` yaml
113
113
steps :
114
114
- uses : actions/checkout@v3
115
- - uses : actions/setup-python@v3
115
+ - uses : actions/setup-python@v4
116
116
with :
117
117
python-version : ' 3.11.0-alpha.1'
118
118
- run : python my_script.py
@@ -122,7 +122,7 @@ Download and set up the latest available version of Python (includes both pre-re
122
122
` ` ` yaml
123
123
steps :
124
124
- uses : actions/checkout@v3
125
- - uses : actions/setup-python@v3
125
+ - uses : actions/setup-python@v4
126
126
with :
127
127
python-version : ' 3.11.0-alpha - 3.11.0' # SemVer's version range syntax
128
128
- run : python my_script.py
@@ -142,7 +142,7 @@ jobs:
142
142
- ' pypy-3.8' # the latest available version of PyPy that supports Python 3.8
143
143
steps :
144
144
- uses : actions/checkout@v3
145
- - uses : actions/setup-python@v3
145
+ - uses : actions/setup-python@v4
146
146
with :
147
147
python-version : ${{ matrix.python-version }}
148
148
- run : python my_script.py
@@ -241,7 +241,7 @@ The requirements file format allows to specify dependency versions using logical
241
241
```yaml
242
242
steps:
243
243
- uses: actions/checkout@v3
244
- - uses: actions/setup-python@v3
244
+ - uses: actions/setup-python@v4
245
245
with:
246
246
python-version: '3.9'
247
247
cache: 'pip'
@@ -254,7 +254,7 @@ steps:
254
254
- uses : actions/checkout@v3
255
255
- name : Install pipenv
256
256
run : pipx install pipenv
257
- - uses : actions/setup-python@v3
257
+ - uses : actions/setup-python@v4
258
258
with :
259
259
python-version : ' 3.9'
260
260
cache : ' pipenv'
@@ -267,7 +267,7 @@ steps:
267
267
- uses : actions/checkout@v3
268
268
- name : Install poetry
269
269
run : pipx install poetry
270
- - uses : actions/setup-python@v3
270
+ - uses : actions/setup-python@v4
271
271
with :
272
272
python-version : ' 3.9'
273
273
cache : ' poetry'
@@ -279,7 +279,7 @@ steps:
279
279
` ` ` yaml
280
280
steps :
281
281
- uses : actions/checkout@v3
282
- - uses : actions/setup-python@v3
282
+ - uses : actions/setup-python@v4
283
283
with :
284
284
python-version : ' 3.9'
285
285
cache : ' pip'
@@ -293,7 +293,7 @@ steps:
293
293
- uses : actions/checkout@v3
294
294
- name : Install pipenv
295
295
run : pipx install pipenv
296
- - uses : actions/setup-python@v3
296
+ - uses : actions/setup-python@v4
297
297
with :
298
298
python-version : ' 3.9'
299
299
cache : ' pipenv'
0 commit comments