mirror of
https://github.com/pnpm/action-setup.git
synced 2025-03-13 22:24:34 +08:00
Add readme example for omitting version
This commit is contained in:
parent
23657c8550
commit
08bc1bb9f6
19
README.md
19
README.md
@ -60,7 +60,7 @@ Location of `pnpm` and `pnpx` command.
|
|||||||
|
|
||||||
## Usage example
|
## Usage example
|
||||||
|
|
||||||
### Just install pnpm
|
### Install only pnpm
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
on:
|
on:
|
||||||
@ -77,6 +77,23 @@ jobs:
|
|||||||
version: 8
|
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
|
### Install pnpm and a few npm packages
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user