mirror of
https://github.com/actions/setup-python.git
synced 2025-07-22 11:38:20 +02:00
add support for python-version-file
This commit is contained in:
parent
7f80679172
commit
5d2a3532c1
5 changed files with 89 additions and 2 deletions
12
README.md
12
README.md
|
@ -20,6 +20,7 @@ This action sets up a Python environment for use in actions by:
|
|||
- Support for pre-release versions of Python.
|
||||
- Support for installing any version of PyPy on-flight
|
||||
- Support for built-in caching of pip and pipenv dependencies
|
||||
- Support for `.python-version` file
|
||||
|
||||
# Usage
|
||||
|
||||
|
@ -36,6 +37,17 @@ steps:
|
|||
- run: python my_script.py
|
||||
```
|
||||
|
||||
Read Python version from file:
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version-file: '.python-version' # Read python version from a file
|
||||
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
|
||||
- run: python my_script.py
|
||||
```
|
||||
|
||||
Matrix Testing:
|
||||
```yaml
|
||||
jobs:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue