Skip to content

Commit c8475b5

Browse files
authored
docs: add example with * for latest stable Python release
1 parent aed5b12 commit c8475b5

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

docs/advanced-usage.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ steps:
8989
- run: python my_script.py
9090
```
9191
92-
- **[x-ranges](https://github.com/npm/node-semver#x-ranges-12x-1x-12-)** to specify the latest stable version of Python (for specified major version):
92+
- **[x-ranges](https://github.com/npm/node-semver#x-ranges-12x-1x-12-)** to specify the latest stable version of Python for the specified major version:
9393
9494
```yaml
9595
steps:
@@ -99,6 +99,18 @@ steps:
9999
python-version: '3.x'
100100
- run: python my_script.py
101101
```
102+
103+
Or for the latest stable version of Python without specifying any major version:
104+
105+
```yaml
106+
steps:
107+
- uses: actions/checkout@v3
108+
- uses: actions/setup-python@v4
109+
with:
110+
python-version: '*'
111+
- run: python my_script.py
112+
```
113+
102114
Please refer to the [Advanced range syntax section](https://github.com/npm/node-semver#advanced-range-syntax) of the [semver](https://github.com/npm/node-semver) to check other available range syntaxes.
103115
104116
### Specifying a PyPy version

0 commit comments

Comments
 (0)