mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-14 03:30:19 +00:00
c9b44935ed
* Revert "👷 build: disable pnpm gvs for desktop ci (#14357)" This reverts commit948ba5ec68. * Revert "👷 build(repo): migrate to pnpm v11 and consolidate workspace config (#14316)" This reverts commit1d9b6099bd.
35 lines
1012 B
YAML
35 lines
1012 B
YAML
name: Desktop Build Setup
|
|
description: Setup Node.js, pnpm and install dependencies for desktop build
|
|
|
|
inputs:
|
|
node-version:
|
|
description: Node.js version
|
|
required: true
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Setup environment
|
|
uses: ./.github/actions/setup-env
|
|
with:
|
|
node-version: ${{ inputs.node-version }}
|
|
|
|
- name: Install dependencies
|
|
shell: bash
|
|
run: pnpm install --node-linker=hoisted
|
|
|
|
# 移除国内 electron 镜像配置,GitHub Actions 使用官方源更快
|
|
- name: Remove China electron mirror from .npmrc
|
|
shell: bash
|
|
run: |
|
|
NPMRC_FILE="./apps/desktop/.npmrc"
|
|
if [ -f "$NPMRC_FILE" ]; then
|
|
sed -i.bak '/^electron_mirror=/d; /^electron_builder_binaries_mirror=/d' "$NPMRC_FILE"
|
|
rm -f "${NPMRC_FILE}.bak"
|
|
echo "✅ Removed electron mirror config from .npmrc"
|
|
fi
|
|
|
|
- name: Install deps on Desktop
|
|
shell: bash
|
|
run: npm run install-isolated --prefix=./apps/desktop
|