diff --git a/.github/workflows/windows-package.yml b/.github/workflows/windows-package.yml
index 405ee6bd29..c54f013a59 100644
--- a/.github/workflows/windows-package.yml
+++ b/.github/workflows/windows-package.yml
@@ -105,10 +105,11 @@ jobs:
ref: ${{ github.workflow_sha }}
sparse-checkout: apps/desktop/scripts
- name: Stage workflow helpers
+ id: helpers
run: |
$helpers = Join-Path $env:RUNNER_TEMP "packaging-helpers-$env:GITHUB_RUN_ID-$env:GITHUB_RUN_ATTEMPT"
New-Item -ItemType Directory -Path $helpers -ErrorAction Stop | Out-Null
- foreach ($name in @('windows-packaging-priority.ps1')) {
+ foreach ($name in @('windows-packaging-priority.ps1', 'windows-packaging-summary.mjs')) {
Copy-Item -LiteralPath (Join-Path 'apps/desktop/scripts' $name) -Destination $helpers -ErrorAction Stop
}
"PACKAGE_CI_HELPERS=$helpers" >> $env:GITHUB_ENV
@@ -176,6 +177,14 @@ jobs:
env:
PACKAGE_BUILD_VERSION: ${{ inputs.build_version }}
run: node apps/desktop/scripts/prepare-windows-ci.mjs
+ - name: Summarize packaging parameters
+ if: always() && steps.helpers.outcome == 'success'
+ env:
+ PACKAGE_INPUT_VERSION_MODE: ${{ inputs.version_mode }}
+ PACKAGE_BUILD_VERSION: ${{ inputs.build_version }}
+ PACKAGE_SOURCE_SHA: ${{ steps.checkout.outputs.commit }}
+ PACKAGE_VERSION: ${{ steps.settings.outputs.version }}
+ run: node "$env:PACKAGE_CI_HELPERS/windows-packaging-summary.mjs"
- name: Check packaging configuration and toolchain
env:
PACKAGE_VERSION: ${{ steps.settings.outputs.version }}
diff --git a/apps/desktop/publishing/ci/README.i18n.yaml b/apps/desktop/publishing/ci/README.i18n.yaml
index a1d7210bf1..d6eaef8e8b 100644
--- a/apps/desktop/publishing/ci/README.i18n.yaml
+++ b/apps/desktop/publishing/ci/README.i18n.yaml
@@ -24,8 +24,8 @@
en: 0f43f2e193e95043
zh: 1c1efb062c06f7b8
/desktop-ci-publication/package-and-publish:
- en: 6325c71df74a9915
- zh: edaa8a4502ed80a1
+ en: 2b75de75308c7729
+ zh: 1b09a6edd8c7e9b0
/desktop-ci-publication/rollout-and-website-publication:
en: ee7a9ab8c66df979
zh: c355668bc9bdb635
diff --git a/apps/desktop/publishing/ci/README.md b/apps/desktop/publishing/ci/README.md
index be001eb216..7516a3c755 100644
--- a/apps/desktop/publishing/ci/README.md
+++ b/apps/desktop/publishing/ci/README.md
@@ -69,6 +69,8 @@ Environment approval gates this workflow, not arbitrary code running under the s
## Package and publish
+The Windows packaging run shows a Chinese parameter summary with the requested source, environment, channel, version mode, signing mode, compression, test release ID and cache namespace, plus the workflow identity, checked-out commit, resolved version and runner. Once workflow helpers are staged, earlier failures still produce the summary with unavailable results labeled explicitly. The summary reads no machine configuration; a blank test release ID is shown as machine-default selection, not its resolved value. It does not establish build, signature or publication success.
+
The publication form accepts an optional `staging_percentage` integer from 0 to 100. It applies to the retained package’s channel (nightly or stable), appears in the approval summary, and is included in the published YAML and audit record without modifying retained artifacts. Leave it blank for the packaged default (normally full rollout). Completed publications cannot change this percentage through a retry; same-version feed conflicts remain errors.
For publication to either test or production, choose Windows `signing=signed` or leave macOS **Skip notarization** unchecked. Unsigned and unnotarized packages are only for internal debugging; they cannot publish or provide automatic updates. Before installing dependencies, the hosted routing job rejects debugging artifacts identified by the selected run and attempt. An archive-only rerun retains the original build attempt in artifact names, so this early check can miss it; local manifest qualification still rejects debugging builds before publication. Missing artifact metadata does not establish eligibility: the original machine still validates its retained manifest and signatures. A debugging-package rejection requires a new signed/notarized package and its run ID / attempt; retrying publication cannot qualify the existing bytes.
diff --git a/apps/desktop/publishing/ci/README.zh.md b/apps/desktop/publishing/ci/README.zh.md
index 9b0bffe7a8..1dc229fd4c 100644
--- a/apps/desktop/publishing/ci/README.zh.md
+++ b/apps/desktop/publishing/ci/README.zh.md
@@ -69,6 +69,8 @@ Environment 审批限制此工作流,不限制同一机器账户运行的任
## 打包与发布
+Windows 打包运行会展示中文参数摘要,列出请求的源码、环境、通道、版本模式、签名方式、压缩等级、测试 release ID 和缓存命名空间,以及工作流标识、检出提交、解析版本和 runner。工作流辅助脚本暂存成功后,即使前序步骤失败仍会生成摘要,并明确标记尚未取得的结果。摘要不读取机器配置;测试 release ID 留空时仅显示选择了机器默认值,不展示其解析值。摘要不代表构建、签名或发布成功。
+
发布表单支持可选的 `staging_percentage`,取值为 0 到 100 的整数。该值作用于保留包所属的 nightly 或 stable 渠道,显示在审批摘要中,并写入发布的 YAML 和审计记录,不修改保留产物。留空沿用包内默认值(通常为全量)。已完成的发布不能通过重试修改比例;同版本清单内容冲突仍会报错。
发布到 test 或 production 都必须在 Windows 选择 `signing=signed`,或在 macOS 不勾选**跳过公证**。无签名、无公证的包仅限内部调试,不能发布或用于自动更新。托管路由 job 会在安装依赖前,依据所选 run 和 attempt 对应的 artifact 名称拒绝已标明的调试包。仅重跑归档时,artifact 名称保留原构建 attempt,早期检查可能未识别该包;本地清单资格校验仍会在发布前拒绝调试包。缺少 artifact 元数据不代表允许发布:原机器仍会验证留存清单和签名。遇到调试包拒绝提示时,需重新完成签名或公证,再使用新包的 run ID / attempt 发布;重跑发布不能使现有产物获得发布资格。
diff --git a/apps/desktop/scripts/windows-packaging-summary.d.mts b/apps/desktop/scripts/windows-packaging-summary.d.mts
new file mode 100644
index 0000000000..d369273144
--- /dev/null
+++ b/apps/desktop/scripts/windows-packaging-summary.d.mts
@@ -0,0 +1,7 @@
+/** Windows packaging parameter summary without machine configuration access. */
+/**
+ * Summarize allowlisted workflow inputs and resolved build identity.
+ * @param environment Workflow inputs and GitHub run identity.
+ * @returns Markdown tables without a build or signature success claim.
+ */
+export function windowsPackagingSummary(environment: NodeJS.ProcessEnv): string
diff --git a/apps/desktop/scripts/windows-packaging-summary.mjs b/apps/desktop/scripts/windows-packaging-summary.mjs
new file mode 100644
index 0000000000..c5f9d2aac4
--- /dev/null
+++ b/apps/desktop/scripts/windows-packaging-summary.mjs
@@ -0,0 +1,45 @@
+/** Render Windows packaging inputs and resolved build identity without loading machine configuration. */
+import { appendFile } from 'node:fs/promises'
+import { realpathSync } from 'node:fs'
+import { fileURLToPath } from 'node:url'
+
+function text(value) {
+ return value.replace(/[&<>"'|`\r\n\\*_\[\]()!~:]/gu, character => `${character.charCodeAt(0)};`)
+}
+
+/**
+ * Summarize allowlisted workflow inputs separately from resolved checkout and version values.
+ * @param {NodeJS.ProcessEnv} environment Workflow inputs and GitHub run identity.
+ * @returns {string} Markdown parameter tables; no signature or publication success claim.
+ */
+export function windowsPackagingSummary(environment) {
+ const row = (label, value, fallback = '未提供') => `| ${label} | ${value ? `${text(value)}` : fallback} |`
+ return [
+ '## Windows 打包参数', '',
+ '以下记录输入参数与已解析结果,不代表构建、签名或发布成功;执行结果以各步骤状态为准。', '',
+ '### 输入参数', '', '| 项目 | 选择值 |', '| --- | --- |',
+ row('源码 ref', environment.PACKAGE_SOURCE_REF),
+ row('环境', environment.DSH_PACKAGING_PRESET),
+ row('升级通道', environment.DSH_DESKTOP_UPDATE_CHANNEL),
+ row('版本模式', environment.PACKAGE_INPUT_VERSION_MODE),
+ row('手动版本号', environment.PACKAGE_BUILD_VERSION, '未填写'),
+ row('签名方式(请求)', environment.PACKAGE_SIGNING),
+ row('安装器压缩等级', environment.PACKAGE_WINDOWS_COMPRESSION_LEVEL),
+ row('测试 release ID(输入)', environment.PACKAGE_TEST_RELEASE_ID, '使用机器默认值(本摘要不读取)'),
+ row('缓存命名空间', environment.PACKAGE_CACHE_NAMESPACE, '共享缓存'), '',
+ '### 执行信息', '', '| 项目 | 已知值 |', '| --- | --- |',
+ row('平台', 'win-x64'),
+ row('工作流 ref', environment.GITHUB_WORKFLOW_REF),
+ row('工作流 SHA', environment.GITHUB_WORKFLOW_SHA),
+ row('检出源码 SHA', environment.PACKAGE_SOURCE_SHA, '尚未取得'),
+ row('解析后的版本号', environment.PACKAGE_VERSION, '尚未解析成功'),
+ row('Runner', environment.RUNNER_NAME),
+ row('运行 ID', environment.GITHUB_RUN_ID),
+ row('尝试次数', environment.GITHUB_RUN_ATTEMPT), '',
+ ].join('\n')
+}
+
+if (process.argv[1] && realpathSync(process.argv[1]) === fileURLToPath(import.meta.url)) {
+ if (!process.env.GITHUB_STEP_SUMMARY) throw new Error('Windows packaging summary requires GITHUB_STEP_SUMMARY')
+ await appendFile(process.env.GITHUB_STEP_SUMMARY, windowsPackagingSummary(process.env))
+}
diff --git a/apps/desktop/tests/windows-packaging-summary.spec.ts b/apps/desktop/tests/windows-packaging-summary.spec.ts
new file mode 100644
index 0000000000..328cb85d16
--- /dev/null
+++ b/apps/desktop/tests/windows-packaging-summary.spec.ts
@@ -0,0 +1,58 @@
+/** Workflow summaries distinguish requested options from completed build evidence. */
+import { execFile } from 'node:child_process'
+import { copyFile, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises'
+import { tmpdir } from 'node:os'
+import { join } from 'node:path'
+import { promisify } from 'node:util'
+import { expect, it } from 'vitest'
+import { windowsPackagingSummary } from '../scripts/windows-packaging-summary.mjs'
+
+it('separates workflow identity, requested source, and resolved build version', () => {
+ const summary = windowsPackagingSummary({
+ PACKAGE_SOURCE_REF: 'feature/windows', PACKAGE_SOURCE_SHA: 'source-sha',
+ GITHUB_WORKFLOW_REF: 'repo/.github/workflows/windows-package.yml@refs/heads/master',
+ GITHUB_WORKFLOW_SHA: 'workflow-sha', PACKAGE_INPUT_VERSION_MODE: 'default',
+ PACKAGE_VERSION: '0.2.2-rc.1.20261110.1.1', PACKAGE_SIGNING: 'signed',
+ DSH_PACKAGING_PRESET: 'test', DSH_DESKTOP_UPDATE_CHANNEL: 'nightly',
+ })
+ expect(summary).toContain('| 源码 ref | feature/windows |')
+ expect(summary).toContain('| 检出源码 SHA | source-sha |')
+ expect(summary).toContain('| 工作流 SHA | workflow-sha |')
+ expect(summary).toContain('| 版本模式 | default |')
+ expect(summary).toContain('| 解析后的版本号 | 0.2.2-rc.1.20261110.1.1 |')
+ expect(summary).toContain('不代表构建、签名或发布成功')
+})
+
+it('retains unresolved and machine-default labels after an earlier failure', () => {
+ const summary = windowsPackagingSummary({ PACKAGE_SOURCE_REF: 'bad-source' })
+ expect(summary).toContain('| 检出源码 SHA | 尚未取得 |')
+ expect(summary).toContain('| 解析后的版本号 | 尚未解析成功 |')
+ expect(summary).toContain('使用机器默认值(本摘要不读取)')
+ expect(summary).toContain('| 缓存命名空间 | 共享缓存 |')
+})
+
+it('escapes input markup and excludes unrelated environment and private configuration', () => {
+ const summary = windowsPackagingSummary({
+ PACKAGE_SOURCE_REF: '