Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add readme example for omitting version #134

Merged
merged 2 commits into from
Jul 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ Location of `pnpm` and `pnpx` command.

## Usage example

### Just install pnpm
### Install only pnpm without `packageManager`

This works when the repo either doesn't have a `package.json` or has a `package.json` but it doesn't specify `packageManager`.

```yaml
on:
Expand All @@ -77,6 +79,23 @@ jobs:
version: 8
```

### Install only pnpm with `packageManager`

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
Expand Down
Loading