Skip to content

Conversation

@awsl1414
Copy link
Contributor

  • feat: 为 Windows 构建添加 x64 和 ARM64 分离任务
  • feat: 为 Linux 构建添加 ARM64 架构支持
  • feat: 优化构建产物命名,包含架构标识
  • chore: 更新构建相关依赖版本
  • fix: 修复 workflow 脚本 SPlayer 拼写错误
  • improve: Linux ARM64 使用 QEMU 交叉编译
  • improve: 优化工作流任务命名和注释

- feat: 为 Windows 构建添加 x64 和 ARM64 分离任务
- feat: 为 Linux 构建添加 ARM64 架构支持
- feat: 优化构建产物命名,包含架构标识
- chore: 更新构建相关依赖版本
- improve: Linux ARM64 使用 QEMU 交叉编译
- improve: 优化工作流任务命名和注释
@awsl1414
Copy link
Contributor Author

@MonkeyCode-AI review

Copy link

@MonkeyCode-AI MonkeyCode-AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我是 MonkeyCode AI 编程助手,你可以在 GitHub 任意仓库的任意 Issue 或 PR 中 at @MonkeyCode-AI 来呼唤我。

任务执行细节请参考: d496bc72-a93d-11f0-9ce3-ee6ce69b85f1

Pull Request 概述

  • 这次 PR 的主要目的是支持 Windows ARM64 架构的构建,同时更新了 Electron 和相关依赖的版本。
  • 它增强了发布流程,添加了对多种架构(x64 和 ARM64)和平台(Windows、macOS、Linux)的构建支持,并改进了 artifact 的命名和清理过程。
  • 此外,PR 还更新了 Electron 相关的依赖版本,增强了构建和发布的稳定性和兼容性。

Pull Request 变更详情

  • 此次变更主要集中在 GitHub Actions 工作流、Electron 构建配置和依赖版本上。
变更详情
  • | 文件路径 | 变更类型 | 变更内容 |
    | -------- | -------- | -------- |
    | .github/workflows/build.yml | 修改 | 增加了对 Windows ARM64 架构的构建支持,并改进了构建和 artifact 上传流程 |
    | .github/workflows/release.yml | 修改 | 增加了对多架构(x64 和 ARM64)和多平台(Windows、macOS、Linux)的发布支持,并更新了 Node.js 版本 |
    | electron-builder.yml | 修改 | 配置了多架构的 artifact 命名规则和构建目标 |
    | package.json | 修改 | 更新了 Electron Builder 相关依赖的版本 |
    | pnpm-lock.yaml | 修改 | 更新了大量依赖的版本,以匹配 package.json 的更改 |

}
# 构建 Electron App (x64)
- name: Build Electron App for Windows x64
run: pnpm run build:win -- --x64

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.github/workflows/build.yml.github/workflows/release.yml 中,构建命令后使用了 || true,这会隐藏构建过程中的错误。建议移除 || true 以确保构建失败时能正确中断流程。

Suggested change
run: pnpm run build:win -- --x64
# Windows x64 构建
- name: Build Electron App for Windows x64
run: pnpm run build:win -- --x64
# Windows ARM64 构建
- name: Build Electron App for Windows ARM64
run: pnpm run build:win -- --arm64
# macOS 构建
- name: Build Electron App for macOS (x64 + ARM64)
run: pnpm run build:mac
# Linux x64 构建
- name: Build Electron App for Linux x64
run: pnpm run build:linux -- --x64
# Linux ARM64 构建
- name: Build Electron App for Linux ARM64
run: pnpm run build:linux -- --arm64

run: rm -rf dist
# 构建 Electron App (ARM64)
- name: Build Electron App for Linux ARM64
run: pnpm run build:linux -- --arm64 || true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.github/workflows/release.yml 中,Linux ARM64 构建部分缺少 || true,但其他构建步骤都使用了。为了保持一致性并确保构建过程的可靠性,建议统一处理方式。

Suggested change
run: pnpm run build:linux -- --arm64 || true
# Linux ARM64 构建
- name: Build Electron App for Linux ARM64
run: pnpm run build:linux -- --arm64 || true
shell: bash

# macOS 平台全局文件名模板
artifactName: ${name}-${version}-${arch}.${ext}
# 扩展信息,如权限描述
extendInfo:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

electron-builder.yml 中,macOS 的权限描述被重新格式化为列表形式。虽然功能上没有变化,但建议保持与之前一致的格式以提高可读性。

Suggested change
extendInfo:
# 扩展信息,如权限描述
extendInfo:
- NSCameraUsageDescription: Application requests access to the device's camera.
- NSMicrophoneUsageDescription: Application requests access to the device's microphone.
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.

- feat: Windows ARM64 使用 windows-11-arm 原生 runner
- feat: macOS 拆分为独立的 x64 和 ARM64 构建任务
- feat: macOS x64 使用 macos-13 原生 Intel runner
- feat: macOS ARM64 使用 macos-15 原生 Apple Silicon runner
- feat: Linux ARM64 使用 ubuntu-22.04-arm 原生 runner
- fix: 修复 Windows ARM64 交叉编译生成错误 I386 指令集问题
- improve: 移除 QEMU 和交叉编译工具链依赖
- improve: 简化构建配置,提升构建可靠性和性能
- improve: 确保所有平台生成正确架构的可执行文件
@imsyy imsyy merged commit ac6ce25 into imsyy:dev Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants