mirror of
https://github.com/pnpm/action-setup.git
synced 2026-07-02 02:11:49 +00:00
Compare commits
7 Commits
2456272c65
...
8cc2f6fe67
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8cc2f6fe67 | ||
|
|
218cb35941 | ||
|
|
3723f63bb4 | ||
|
|
849d884800 | ||
|
|
f92eb0edb6 | ||
|
|
a3d5f0afbc | ||
|
|
65db188e28 |
30
README.md
30
README.md
@ -64,7 +64,7 @@ jobs:
|
||||
steps:
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 6.0.2
|
||||
version: 8
|
||||
```
|
||||
|
||||
### Install pnpm and a few npm packages
|
||||
@ -83,7 +83,7 @@ jobs:
|
||||
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 6.0.2
|
||||
version: 8
|
||||
run_install: |
|
||||
- recursive: true
|
||||
args: [--frozen-lockfile, --strict-peer-dependencies]
|
||||
@ -105,31 +105,15 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- uses: pnpm/action-setup@v2
|
||||
name: Install pnpm
|
||||
id: pnpm-install
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 7
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
node-version: 16
|
||||
cache: pnpm
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
@ -6,6 +6,7 @@ branding:
|
||||
inputs:
|
||||
version:
|
||||
description: Version of pnpm to install
|
||||
required: false
|
||||
dest:
|
||||
description: Where to store pnpm files
|
||||
required: false
|
||||
|
||||
@ -49,7 +49,7 @@ Otherwise, please specify the pnpm version in the action configuration.`)
|
||||
throw new Error(`No pnpm version is specified.
|
||||
Please specify it by one of the following ways:
|
||||
- in the GitHub Action config with the key "version"
|
||||
- in the package.json with the key "packageManager" (See https://nodejs.org/api/corepack.html)`)
|
||||
- in the package.json with the key "packageManager"`)
|
||||
}
|
||||
|
||||
if (!packageManager.startsWith('pnpm@')) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user