mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-04 21:22:07 +00:00
fix(ci): resolve pnpm version conflict in version bump workflow
Remove hardcoded version: 10 from pnpm/action-setup which conflicts with packageManager in package.json on main. Instead, inject the packageManager field into package.json when absent (legacy core/* branches) so the action can resolve the version from it. Fixes the 'Multiple versions of pnpm specified' error on main while maintaining compatibility with older branches that lack packageManager.
This commit is contained in:
16
.github/workflows/release-version-bump.yaml
vendored
16
.github/workflows/release-version-bump.yaml
vendored
@@ -142,10 +142,22 @@ jobs:
|
||||
fi
|
||||
echo "✅ Branch '$BRANCH' exists"
|
||||
|
||||
- name: Ensure packageManager field exists
|
||||
run: |
|
||||
if ! grep -q '"packageManager"' package.json; then
|
||||
# Old branches (e.g. core/1.42) predate the packageManager field.
|
||||
# Inject it so pnpm/action-setup can resolve the version.
|
||||
node -e "
|
||||
const fs = require('fs');
|
||||
const pkg = JSON.parse(fs.readFileSync('package.json','utf8'));
|
||||
pkg.packageManager = 'pnpm@10.33.0';
|
||||
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
|
||||
"
|
||||
echo "Injected packageManager into package.json for legacy branch"
|
||||
fi
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
|
||||
with:
|
||||
version: 10
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v6
|
||||
|
||||
Reference in New Issue
Block a user