mirror of
https://github.com/pnpm/action-setup.git
synced 2026-07-07 05:05:48 +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:
|
steps:
|
||||||
- uses: pnpm/action-setup@v2
|
- uses: pnpm/action-setup@v2
|
||||||
with:
|
with:
|
||||||
version: 6.0.2
|
version: 8
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install pnpm and a few npm packages
|
### Install pnpm and a few npm packages
|
||||||
@ -83,7 +83,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: pnpm/action-setup@v2
|
- uses: pnpm/action-setup@v2
|
||||||
with:
|
with:
|
||||||
version: 6.0.2
|
version: 8
|
||||||
run_install: |
|
run_install: |
|
||||||
- recursive: true
|
- recursive: true
|
||||||
args: [--frozen-lockfile, --strict-peer-dependencies]
|
args: [--frozen-lockfile, --strict-peer-dependencies]
|
||||||
@ -105,31 +105,15 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Node.js
|
- name: Install pnpm
|
||||||
uses: actions/setup-node@v3
|
uses: pnpm/action-setup@v2
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
with:
|
||||||
version: 7
|
version: 7
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
- uses: actions/setup-node@v3
|
||||||
id: pnpm-cache
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
node-version: 16
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
cache: pnpm
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install
|
||||||
|
|||||||
@ -6,6 +6,7 @@ branding:
|
|||||||
inputs:
|
inputs:
|
||||||
version:
|
version:
|
||||||
description: Version of pnpm to install
|
description: Version of pnpm to install
|
||||||
|
required: false
|
||||||
dest:
|
dest:
|
||||||
description: Where to store pnpm files
|
description: Where to store pnpm files
|
||||||
required: false
|
required: false
|
||||||
|
|||||||
@ -49,7 +49,7 @@ Otherwise, please specify the pnpm version in the action configuration.`)
|
|||||||
throw new Error(`No pnpm version is specified.
|
throw new Error(`No pnpm version is specified.
|
||||||
Please specify it by one of the following ways:
|
Please specify it by one of the following ways:
|
||||||
- in the GitHub Action config with the key "version"
|
- 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@')) {
|
if (!packageManager.startsWith('pnpm@')) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user