File tree Expand file tree Collapse file tree 4 files changed +15
-6
lines changed
Filter options
Expand file tree Collapse file tree 4 files changed +15
-6
lines changed
Original file line number Diff line number Diff line change 19
19
- uses : actions/checkout@master
20
20
- uses : actions/setup-python@v1
21
21
with :
22
- version : ' 3.x' // Version range or exact version of a Python version to use, using semvers version range syntax.
22
+ python- version : ' 3.x' // Version range or exact version of a Python version to use, using semvers version range syntax.
23
23
architecture : ' x64' // (x64 or x86)
24
24
- run : python my_script.py
25
25
` ` `
38
38
- name : Setup python
39
39
uses : actions/setup-python@v1
40
40
with :
41
- version : ${{ matrix.python }}
41
+ python- version : ${{ matrix.python }}
42
42
architecture : x64
43
43
- run : python my_script.py
44
44
` ` `
Original file line number Diff line number Diff line change 1
1
name : ' Setup Python environment'
2
2
description : ' Setup a Python environment and add it to the PATH, additionally providing proxy support'
3
3
author : ' GitHub'
4
- inputs :
5
- version :
4
+ inputs :
5
+ python- version :
6
6
description : ' Version range or exact version of a Python version to use, using semvers version range syntax.'
7
7
default : ' 3.x'
8
8
architecture :
9
9
description : ' The target architecture (x86, x64) of the Python interpreter.'
10
10
default : ' x64'
11
+ # Deprecated option, do not use. Will not be supported after October 1, 2019
12
+ version :
13
+ description : ' Deprecated. Use python-version instead. Will not be supported after October 1, 2019'
11
14
runs :
12
15
using : ' node12'
13
16
main : ' lib/setup-python.js'
Original file line number Diff line number Diff line change @@ -21,7 +21,10 @@ const path = __importStar(require("path"));
21
21
function run ( ) {
22
22
return __awaiter ( this , void 0 , void 0 , function * ( ) {
23
23
try {
24
- const version = core . getInput ( 'version' ) ;
24
+ let version = core . getInput ( 'version' ) ;
25
+ if ( ! version ) {
26
+ version = core . getInput ( 'python-version' ) ;
27
+ }
25
28
if ( version ) {
26
29
const arch = core . getInput ( 'architecture' , { required : true } ) ;
27
30
yield finder . findPythonVersion ( version , arch ) ;
Original file line number Diff line number Diff line change @@ -4,7 +4,10 @@ import * as path from 'path';
4
4
5
5
async function run ( ) {
6
6
try {
7
- const version : string = core . getInput ( 'version' ) ;
7
+ let version = core . getInput ( 'version' ) ;
8
+ if ( ! version ) {
9
+ version = core . getInput ( 'python-version' ) ;
10
+ }
8
11
if ( version ) {
9
12
const arch : string = core . getInput ( 'architecture' , { required : true } ) ;
10
13
await finder . findPythonVersion ( version , arch ) ;
You can’t perform that action at this time.
0 commit comments