Compare commits

...

7 Commits

Author SHA1 Message Date
Thai Pangsakulyanont
8cc2f6fe67
Merge a3d5f0afbc into 218cb35941 2023-07-25 14:17:19 +07:00
Khải
218cb35941
Merge pull request #69 from zakuro9715/zakuro9715-patch-2
Remove corepack url in error message
2023-07-25 14:16:42 +07:00
Khải
3723f63bb4
Merge pull request #90 from pnpm/optional-version
feat: make version actually optional
2023-07-25 14:05:04 +07:00
khai96_
849d884800 feat: make version actually optional
closes https://github.com/pnpm/action-setup/issues/85
2023-07-25 14:01:28 +07:00
khai96_
f92eb0edb6 docs: update pnpm version in readme
fixes https://github.com/pnpm/action-setup/issues/89
2023-07-25 13:50:35 +07:00
Thai Pangsakulyanont
a3d5f0afbc
Use actions/setup-node to cache pnpm store instead of doing it manually 2023-03-14 14:13:56 +07:00
zakuro
65db188e28
Remove corepack url in error message 2022-11-09 06:54:12 +09:00
3 changed files with 9 additions and 24 deletions

View File

@ -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

View File

@ -6,6 +6,7 @@ branding:
inputs:
version:
description: Version of pnpm to install
required: false
dest:
description: Where to store pnpm files
required: false

View File

@ -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@')) {