Skip to content

Commit 80e36d3

Browse files
committed
feat: 🎸 sync GitHub Actions pnpm version with packageManager
1 parent 34977c7 commit 80e36d3

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,21 @@ jobs:
2525
with:
2626
node-version: lts/*
2727

28+
- name: Resolve pnpm version from packageManager
29+
id: resolve_pnpm
30+
run: |
31+
PNPM_VERSION=$(node -p "(require('./package.json').packageManager || '').replace(/^pnpm@/, '')")
32+
if [ -z "$PNPM_VERSION" ] || [ "$PNPM_VERSION" = "" ]; then
33+
echo "packageManager does not contain a valid pnpm version"
34+
exit 1
35+
fi
36+
echo "Using pnpm version: $PNPM_VERSION"
37+
echo "version=$PNPM_VERSION" >> "$GITHUB_OUTPUT"
38+
2839
- name: Install pnpm
2940
uses: pnpm/action-setup@v4
3041
with:
31-
version: 10.28.1
42+
version: ${{ steps.resolve_pnpm.outputs.version }}
3243

3344
- name: Install dependencies
3445
run: pnpm install

0 commit comments

Comments
 (0)