Skip to content

Commit 80abada

Browse files
setup-python (#417)
1 parent 83cb998 commit 80abada

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

setup-python

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: "Setup Python"
3+
description: "Set up a specific version of Python and add the command-line tools to the PATH."
4+
author: "GitHub"
5+
inputs:
6+
python-version:
7+
description: "Version range or exact version of Python or PyPy to use, using SemVer's version range syntax. Reads from .python-version if unset."
8+
python-version-file:
9+
description: "File containing the Python version to use. Example: .python-version"
10+
cache:
11+
description: "Used to specify a package manager for caching in the default directory. Supported values: pip, pipenv, poetry."
12+
required: false
13+
architecture:
14+
description: "The target architecture (x86, x64) of the Python or PyPy interpreter."
15+
check-latest:
16+
description: "Set this option if you want the action to check for the latest available version that satisfies the version spec."
17+
default: false
18+
token:
19+
description: "The token used to authenticate when fetching Python distributions from https://github.com/actions/python-versions. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting."
20+
default: ${{ github.server_url == 'https://github.com' && github.token || '' }}
21+
cache-dependency-path:
22+
description: "Used to specify the path to dependency files. Supports wildcards or a list of file names for caching multiple dependencies."
23+
update-environment:
24+
description: "Set this option if you want the action to update environment variables."
25+
default: true
26+
allow-prereleases:
27+
description: "When 'true', a version range passed to 'python-version' input will match prerelease versions if no GA versions are found. Only 'x.y' version range is supported for CPython."
28+
default: false
29+
outputs:
30+
python-version:
31+
description: "The installed Python or PyPy version. Useful when given a version range as input."
32+
cache-hit:
33+
description: "A boolean value to indicate a cache entry was found"
34+
python-path:
35+
description: "The absolute path to the Python or PyPy executable."
36+
runs:
37+
using: 'node20'
38+
main: 'dist/setup/index.js'
39+
post: 'dist/cache-save/index.js'
40+
post-if: success()
41+
branding:
42+
icon: 'code'
43+
color: 'yellow'

0 commit comments

Comments
 (0)