Skip to content

CI: 新增原生环境打包 & 启动日志改进#190

Merged
qaiu merged 4 commits into
qaiu:mainfrom
yukaidi1220:pr/native-package
May 31, 2026
Merged

CI: 新增原生环境打包 & 启动日志改进#190
qaiu merged 4 commits into
qaiu:mainfrom
yukaidi1220:pr/native-package

Conversation

@yukaidi1220
Copy link
Copy Markdown
Contributor

变更摘要

CI: 新增 Linux/Windows 原生环境打包 (jlink + 精简 JRE)

  • Tag push 时自动构建 Linux/Windows 原生安装包 (jlink 精简 JRE),解压即用
  • 前端 + Maven 只构建一次,产物通过 artifact 共享
  • Docker 镜像支持多平台 (amd64/arm64/arm/v7)
  • 构建产物自动同步到 GitHub Release

AppMain: 启动日志增加前端页面访问地址提示

  • 在启动完成后输出页面访问地址,方便用户快速打开
  • 从代理配置文件自动读取页面端口

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR expands the release pipeline to build Docker and native runtime packages, and improves startup output by logging the frontend access URL.

Changes:

  • Reworks Maven CI into shared build, Docker image, and Linux/Windows native package jobs.
  • Adds startup logging for the page access address by reading proxy configuration.
  • Ignores .spec-workflow/ local tooling files.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.

File Description
.github/workflows/maven.yml Adds artifact sharing, multi-platform Docker build, jlink-based native packaging, and release uploads.
web-service/src/main/java/cn/qaiu/lz/AppMain.java Reads proxy config to derive frontend URL and logs it after playground parser loading.
.gitignore Adds .spec-workflow/ to ignored paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +92 to +95
Path configPath = Path.of("resources", configFile);
if (!Files.exists(configPath)) {
configPath = Path.of(configFile);
}
Comment on lines 189 to 192
log.info("服务已启动,可通过 {} 访问页面", accessAddr);
}).onFailure(e -> {
log.error("加载演练场解析器列表失败", e);
});
Comment thread .github/workflows/maven.yml Outdated
if: runner.os == 'Windows'
shell: pwsh
run: |
Compress-Archive -Path native-package/netdisk-fast-download/* -DestinationPath "${{ matrix.artifact-name }}.zip"
if (addr == null || addr.isBlank()) {
addr = "http://127.0.0.1:" + jsonObject.getJsonObject(ConfigConstant.SERVER).getInteger("port", 6400);
}
// 读取代理配置获取前端页面端口(同步读文件,避免阻塞 event loop)
- 配置文件查找顺序与 Deploy 保持一致(先当前目录,再 resources/)
- 页面地址日志改用 onComplete,无论演练场加载成功失败均输出
- Windows ZIP 移除 /* 通配符,与 Linux 保持一致的顶层目录结构
- 修正注释:同步读文件会阻塞 event loop,不再声称'避免阻塞'
- YAML 正则和 jdeps 回退列表补充适用范围说明
@yukaidi1220
Copy link
Copy Markdown
Contributor Author

Copilot Review 修复

Copilot 提出的 4 条 review 已全部处理,修复已提交到本 PR 分支(0feb8e7):

# 问题 修复
1 配置文件查找顺序与 Deploy 不一致(先 resources/ 再当前目录) 改为先当前目录、再 resources/,与 Deploy 保持一致
2 页面地址日志仅在 onSuccess 分支输出 改用 onComplete,无论演练场加载成功或失败均输出
3 Windows ZIP 内部结构与 Linux 不一致(缺少顶层目录) 去掉 Compress-Archive 的 /* 通配符,保留顶层目录
4 注释声称「避免阻塞 event loop」但实际是同步阻塞 修正为「同步读取小文件,仅启动时执行一次」

额外补充:YAML 正则和 jdeps 回退模块列表均增加了适用范围注释。

@qaiu qaiu merged commit 452fd0e into qaiu:main May 31, 2026
5 checks passed
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