mirror of
https://github.com/actions/setup-python.git
synced 2025-06-24 04:38:00 +02:00
Add support for pip-version
(#1129)
* Add pip-version input * Update workflow files * Add documentation * Update workflow files
This commit is contained in:
@ -22,6 +22,7 @@
|
||||
- [macOS](advanced-usage.md#macos)
|
||||
- [Using `setup-python` on GHES](advanced-usage.md#using-setup-python-on-ghes)
|
||||
- [Allow pre-releases](advanced-usage.md#allow-pre-releases)
|
||||
- [Using the pip-version input](advanced-usage.md#using-the-pip-version-input)
|
||||
|
||||
## Using the `python-version` input
|
||||
|
||||
@ -643,3 +644,22 @@ jobs:
|
||||
- run: pipx run nox --error-on-missing-interpreters -s tests-${{ matrix.python_version }}
|
||||
```
|
||||
|
||||
## Using the pip-version input
|
||||
|
||||
The `pip-version` input allows you to specify the desired version of **Pip** to use with the standard Python version.
|
||||
The version of Pip should be specified in the format `major`, `major.minor`, or `major.minor.patch` (for example: 25, 25.1, or 25.0.1).
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.13'
|
||||
pip-version: '25.0.1'
|
||||
- name: Display Pip version
|
||||
run: pip --version
|
||||
```
|
||||
> The `pip-version` input is supported only with standard Python versions. It is not available when using PyPy or GraalPy.
|
||||
|
||||
> Using a specific or outdated version of pip may result in compatibility or security issues and can cause job failures. For best practices and guidance, refer to the official [pip documentation](https://pip.pypa.io/en/stable/).
|
Reference in New Issue
Block a user