Skip to content

Commit f171301

Browse files
author
FallingAKS
committed
fix(release): harden windows packaging with mirrors and portable target
1 parent 12d96c2 commit f171301

File tree

10 files changed

+86
-15
lines changed

10 files changed

+86
-15
lines changed

.github/workflows/release-on-tag.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ permissions:
1111
jobs:
1212
build-windows:
1313
runs-on: windows-latest
14+
env:
15+
ELECTRON_MIRROR: https://npmmirror.com/mirrors/electron/
16+
ELECTRON_BUILDER_BINARIES_MIRROR: https://npmmirror.com/mirrors/electron-builder-binaries/
1417
steps:
1518
- name: Checkout
1619
uses: actions/checkout@v4
@@ -36,8 +39,9 @@ jobs:
3639
name: release-win-assets
3740
path: |
3841
frontend/dist-electron/*.exe
39-
frontend/dist-electron/*.msi
4042
frontend/dist-electron/*.zip
43+
frontend/dist-electron/latest*.yml
44+
frontend/dist-electron/*.blockmap
4145
if-no-files-found: warn
4246

4347
release:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ backend/app/target/
1818

1919
# frontend build artifacts
2020
frontend/dist/
21+
frontend/dist-electron/
2122
frontend/node_modules/
2223

2324
# local editor/system files

docs/release-checklist.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Run in order:
138138
5. **Verify GitHub Release metadata and assets**
139139
- `v3.0.4` exists in Releases
140140
- Title/tag/target branch/release notes are correct
141-
- Windows downloadable assets are attached (`exe/msi/zip`)
141+
- Windows downloadable assets are attached (portable `exe`, and optional `zip`)
142142
6. **Verify runtime surface health**
143143
- `http://localhost:8080/docs` returns `200`
144144
- `http://localhost:8080/redoc` returns `200`

docs/release-tagging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ npm run release:tag -- -Version v3.0.4 -Push -CreateRelease
3636

3737
- 工作流:`.github/workflows/release-on-tag.yml`
3838
- 触发条件:push `v*` tag
39-
- 行为:自动创建 GitHub Release,并开启自动 Release Notes;同时自动构建并挂载 Windows 安装包(`exe/msi/zip`
39+
- 行为:自动创建 GitHub Release,并开启自动 Release Notes;同时自动构建并挂载 Windows 下载包(优先 `portable exe`,按目标可能附带 `zip`
4040
- 若 tag 名含 `-rc/-beta/-alpha`,自动标记为 pre-release
4141

4242
## 5. 失败处理

docs/releases/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ This directory stores release-facing documents:
1313
- [v1.46.2 validation report](./v1.46.2-validation.md)
1414
- [v3.0.4 release notes](./v3.0.4.md)
1515
- [v3.0.5 release notes](./v3.0.5.md)
16+
- [v3.0.6 release notes](./v3.0.6.md)

docs/releases/v3.0.6.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Release Notes: v3.0.6
2+
3+
Release date: 2026-02-20
4+
5+
## Highlights
6+
7+
- Stabilized Windows release packaging pipeline for tagged releases:
8+
- Added mirror-based download configuration in CI for Electron binaries and builder resources.
9+
- Avoided flaky targets and switched to portable-first Windows distribution.
10+
- Hardened desktop packaging config:
11+
- Disabled executable sign/edit step for unsigned build flow.
12+
- Removed IA32 build target from Windows packaging.
13+
- Removed hard dependency on missing local icon files for Windows packaging.
14+
- Completed release documentation sync:
15+
- Updated EN/ZH checklists to match actual downloadable asset shape.
16+
17+
## Why This Release Matters
18+
19+
- Reduces transient network failures during tag-triggered release builds.
20+
- Produces a user-downloadable Windows package path that is more deterministic.
21+
- Keeps release checklist aligned with real artifact output.
22+
23+
## Verification Snapshot
24+
25+
- Local packaging validation:
26+
- `npm run dist:win` succeeds with:
27+
- `ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/`
28+
- `ELECTRON_BUILDER_BINARIES_MIRROR=https://npmmirror.com/mirrors/electron-builder-binaries/`
29+
- CI workflow:
30+
- `.github/workflows/release-on-tag.yml` includes mirror env and Windows artifact upload.
31+
32+
## Included Changes
33+
34+
- `ci(release): attach windows distributables to tag releases` (`897489d7`)
35+
- Packaging hardening and mirror strategy (this release series)
36+
- Release checklist alignment in EN/ZH (this release series)
37+
38+
## Upgrade Notes
39+
40+
- Recommended distribution baseline tag: `v3.0.6`.
41+
- Downloadable asset expectation: portable Windows `exe` (optional `zip` depending on target output).

docs/zh/release-checklist.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ git log --oneline -n 15
138138
5. **确认 Release 页面元数据**
139139
- `Releases` 页面存在 `v3.0.4`
140140
- 标题、Tag、目标分支、发布说明内容一致
141-
- 已附带 Windows 下载包(`exe/msi/zip`
141+
- 已附带 Windows 下载包(优先 portable `exe`,按目标可能含 `zip`
142142
6. **确认核心访问面健康**
143143
- `http://localhost:8080/docs` 返回 `200`
144144
- `http://localhost:8080/redoc` 返回 `200`

docs/zh/releases/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@
1313
- [v1.46.2 验证报告](./v1.46.2-validation.md)
1414
- [v3.0.4 发布说明](./v3.0.4.md)
1515
- [v3.0.5 发布说明](./v3.0.5.md)
16+
- [v3.0.6 发布说明](./v3.0.6.md)

docs/zh/releases/v3.0.6.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# 发布说明:v3.0.6
2+
3+
发布日期:2026-02-20
4+
5+
## 核心更新
6+
7+
- 发布工作流的 Windows 打包链路稳定性增强:
8+
- 在 CI 中增加 Electron 与 builder 资源镜像源配置,降低下载超时风险。
9+
- 采用 portable 优先的 Windows 分发策略。
10+
- 桌面打包配置加固:
11+
- 关闭无签名场景下的可执行文件签名/编辑步骤。
12+
- 移除 Windows IA32 打包目标。
13+
- 去除对缺失图标文件的硬依赖,避免构建中断。
14+
- 发布文档同步:
15+
- 中英文核验清单统一为“portable exe(可选 zip)”资产描述。
16+
17+
## 价值说明
18+
19+
- Tag 触发发布时更容易稳定产出可下载版本。
20+
- 减少网络波动导致的发版失败。
21+
- 文档说明与真实产物一致,降低执行偏差。
22+
23+
## 验证摘要
24+
25+
- 本地验证:
26+
- 在镜像环境变量下,`npm run dist:win` 可成功执行。
27+
- CI 配置:
28+
- `.github/workflows/release-on-tag.yml` 已包含镜像环境变量与 Windows 产物上传。
29+
30+
## 建议基线
31+
32+
- 建议用于对外分发的基线标签:`v3.0.6`
33+
- 预期下载产物:Windows portable `exe`(按目标可能附带 `zip`

frontend/package.json

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,8 @@
109109
}
110110
},
111111
"win": {
112-
"icon": "build/icon.ico",
112+
"signAndEditExecutable": false,
113113
"target": [
114-
{
115-
"target": "nsis",
116-
"arch": [
117-
"x64",
118-
"ia32"
119-
]
120-
},
121114
{
122115
"target": "portable",
123116
"arch": [
@@ -132,9 +125,6 @@
132125
"oneClick": false,
133126
"allowToChangeInstallationDirectory": true,
134127
"allowElevation": true,
135-
"installerIcon": "build/icon.ico",
136-
"uninstallerIcon": "build/icon.ico",
137-
"installerHeaderIcon": "build/icon.ico",
138128
"createDesktopShortcut": true,
139129
"createStartMenuShortcut": true,
140130
"shortcutName": "Moqui ERP",

0 commit comments

Comments
 (0)