Add readme example for omitting version

This commit is contained in:
Karl Horky 2024-07-03 11:39:50 +02:00 committed by GitHub
parent 23657c8550
commit 08bc1bb9f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -60,7 +60,7 @@ Location of `pnpm` and `pnpx` command.
## Usage example
### Just install pnpm
### Install only pnpm
```yaml
on:
@ -77,6 +77,23 @@ jobs:
version: 8
```
### Install only pnpm, use `packageManager` version
Omit `version` input to use the version in the [`packageManager` field in the `package.json`](https://nodejs.org/api/corepack.html).
```yaml
on:
- push
- pull_request
jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v4
```
### Install pnpm and a few npm packages
```yaml