use pnpm for Desktop Electron App (#7679)

This commit is contained in:
Lifei Zhou 2026-03-11 08:46:05 -04:00 committed by GitHub
parent a28c306b23
commit 02bc7ed745
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 13856 additions and 21417 deletions

View file

@ -37,8 +37,9 @@ jobs:
rm -f Cargo.toml.bak
# Update version in package.json
source ./bin/activate-hermit
cd ui/desktop
npm version ${{ inputs.version }} --no-git-tag-version --allow-same-version
pnpm version ${{ inputs.version }} --no-git-tag-version --allow-same-version
- name: Debug workflow info
env:
@ -120,21 +121,21 @@ jobs:
chmod +x ui/desktop/src/bin/goosed
ls -la ui/desktop/src/bin/
- name: Cache npm dependencies
- name: Cache pnpm dependencies
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
with:
path: |
ui/desktop/node_modules
.hermit/node/cache
key: linux-npm-cache-v1-${{ runner.os }}-${{ hashFiles('ui/desktop/package-lock.json') }}
key: linux-pnpm-cache-v1-${{ runner.os }}-${{ hashFiles('ui/desktop/pnpm-lock.yaml') }}
restore-keys: |
linux-npm-cache-v1-${{ runner.os }}-
linux-pnpm-cache-v1-${{ runner.os }}-
- name: Install npm dependencies
- name: Install pnpm dependencies
run: |
source ./bin/activate-hermit
cd ui/desktop
npm ci
pnpm install --frozen-lockfile
# Verify installation
ls -la node_modules/.bin/ | head -5
@ -145,7 +146,7 @@ jobs:
echo "Building Linux packages (.deb, .rpm, and .flatpak)..."
# Build all configured packages
npm run make -- --platform=linux --arch=x64
pnpm run make -- --platform=linux --arch=x64
echo "Build completed. Checking output..."
ls -la out/