8000 doc: move the configuration to its own section · pdm-project/setup-pdm@0b61a6c · GitHub
[go: up one dir, main page]

Skip to content

Commit 0b61a6c

Browse files
committed
doc: move the configuration to its own section
Signed-off-by: Frost Ming <me@frostming.com>
1 parent ddc33ca commit 0b61a6c

File tree

1 file changed

+29
-25
lines changed

1 file changed

+29
-25
lines changed

README.md

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,47 @@ But it is still not obvious and it is a pain for developers to properly build th
99

1010
## Usage
1111

12-
Include the action in your workflow yaml file with the following arguments:
12+
Include the action in your workflow yaml:
1313

1414
```yaml
1515
steps:
16-
...
17-
- uses: pdm-project/setup-pdm@v3
18-
name: Setup PDM
19-
with:
20-
python-version: 3.9 # Version range or exact version of a Python version to use, the same as actions/setup-python
21-
architecture: x64 # The target architecture (x86, x64) of the Python interpreter. the same as actions/setup-python
22-
version: 2.7.4 # The version of PDM to install. Leave it as empty to use the latest version from PyPI, or 'head' to use the latest version from GitHub
23-
prerelease: false # Allow prerelease versions of PDM to be installed
24-
enable-pep582: false # Enable PEP 582 package loading globally
25-
allow-python-prereleases: false # Allow prerelease versions of Python to be installed. For example if only 3.12-dev is available, 3.12 will fallback to 3.12-dev
26-
update-python: true # Update the environment with the requested python version
16+
- uses: actions/checkout@v3
17+
- name: Setup PDM
18+
uses: pdm-project/setup-pdm@v3
19+
# You are now able to use PDM in your workflow
2720
- name: Install dependencies
28-
run: pdm install # Then you can use pdm in the following steps.
29-
...
21+
run: pdm install
3022
```
3123
3224
You don't need `actions/setup-python` actually.
3325

26+
## Action Inputs
27+
28+
This action supports the following inputs:
29+
30+
| Input | Default | Description |
31+
| -------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
32+
| `python-version` | `3.x` | Version range or exact version of a Python version to use, using SemVer's version range syntax. |
33+
| `architecture` | `x64` | The target architecture (x86, x64) of the Python interpreter. |
34+
| `allow-python-prereleases` | `false` | Allow prerelease versions of Python to be installed. |
35+
| `token` | `${{ github.token }}` | Used to pull python distributions from actions/python-versions. Since there's a default, this is typically not supplied by the user. |
36+
| `version` | Not specified | The version of PDM to install, or 'head' to install from the main branch. |
37+
| `prerelease` | `false` | Allow prerelease versions of PDM to be installed |
38+
| `enable-pep582` | `false` | Enable PEP 582 package loading globally. |
39+
| `cache` | `false` | Cache PDM installation. |
40+
| `cache-dependency-path` | `pdm.lock` | The dependency file(s) to cache. |
41+
| `update-python` | `true` | Whether to update the environment with the requested Python |
42+
3443
## Action Outputs
3544

3645
This action also exposes the following outputs:
3746

38-
```yaml
39-
outputs:
40-
python-version:
41-
description: "The installed Python or PyPy version. Useful when given a version range as input."
42-
python-path:
43-
description: "The absolute path to the Python or PyPy executable."
44-
pdm-version:
45-
description: "The installed PDM version."
46-
pdm-bin:
47-
description: "The absolute path to the PDM executable."
48-
```
47+
| Output | Description |
48+
| ---------------- | --------------------------------------------------------------------------------- |
49+
| `python-version` | The installed Python or PyPy version. Useful when given a version range as input. |
50+
| `python-path` | The absolute path to the Python or PyPy executable. |
51+
| `pdm-version` | The installed PDM version. |
52+
| `pdm-bin` | The absolute path to the PDM executable. |
4953

5054
## Caches
5155

0 commit comments

Comments
 (0)
0