1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-python synced 2025-06-10 05:12:19 +02:00

feat: support reading mise.toml

This commit is contained in:
Jorge Rodriguez 2025-03-13 19:35:00 +01:00
parent 19e4675e06
commit 86322ff86a
No known key found for this signature in database
GPG key ID: A22D46F0D97D588A
5 changed files with 70 additions and 4 deletions

View file

@ -280,7 +280,7 @@ jobs:
`setup-python` action can read Python or PyPy version from a version file. `python-version-file` input is used for specifying the path to the version file. If the file that was supplied to `python-version-file` input doesn't exist, the action will fail with error.
>In case both `python-version` and `python-version-file` inputs are supplied, the `python-version-file` input will be ignored due to its lower priority. The .tool-versions file supports version specifications in accordance with asdf standards, adhering to Semantic Versioning ([semver](https://semver.org)).
>In case both `python-version` and `python-version-file` inputs are supplied, the `python-version-file` input will be ignored due to its lower priority. The .tool-versions file supports version specifications in accordance with asdf standards, adhering to Semantic Versioning ([semver](https://semver.org)). The `mise.toml` file supports version specifications in accordance with [mise](https://mise.jdx.dev/configuration.html) standards.
```yaml
steps:
@ -309,6 +309,15 @@ steps:
- run: python my_script.py
```
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version-file: 'mise.toml' # Read python version from a file mise.toml
- run: python my_script.py
```
## Check latest version
The `check-latest` flag defaults to `false`. Use the default or set `check-latest` to `false` if you prefer stability and if you want to ensure a specific `Python or PyPy` version is always used.