Skip to content

A local-first multi-agent app development platform, built on PenguinHarness

ci: a release branch builds its signed installers before the tag (#670)

Yaowei Zheng34f17ad35bdf
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index e3bc004e..543262eb 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -177,6 +177,14 @@ pnpm test:e2e # core live-model e2e, need
version. The release workflow refuses a tag push whose version does not match the
repo's, so a forgotten bump fails before anything is published (v0.2.1 was tagged with a
0.2.0 repo, and every dev build nagged about an update until the repo caught up).
+- **The release branch proves its installers before the tag.** Name the branch
+ `release/<version>`: every push to a `release/**` branch runs `desktop-build.yml` with macOS
+ and Windows signing required, the same call the release workflow makes, and CI never
+ exercises signing. Wait for that run on the branch's final commit before merging and
+ tagging; a tag is never moved, so a failure found after it costs a version (0.2.10 was
+ tagged on a green CI, lost its macOS installers to a runner-image change, and shipped again
+ as 0.2.11). To re-check outside a release branch:
+ `gh workflow run desktop-build.yml --ref <branch> -f require_macos_signing=true -f require_windows_signing=true`.
- README assets under `assets/readme/` are generated — the benchmark charts from the
landing benchmark data, and the demo screenshots via
`node packages/landing/scripts/capture-readme-demo.mjs` (build first; needs Playwright
diff --git a/.github/CONTRIBUTING.zh.md b/.github/CONTRIBUTING.zh.md
index 716398b9..20d56434 100644
--- a/.github/CONTRIBUTING.zh.md
+++ b/.github/CONTRIBUTING.zh.md
@@ -137,10 +137,16 @@ pnpm test:e2e # core 的真实模型 e2e
在发布准备期间撰写,并**在打 tag 之前提交**——发布工作流是从 tag 的 checkout 里读它的,事后添加的
文件永远到不了 Release 页面。缺少它时,工作流退回到 GitHub 自动生成的说明。
- **发布准备要提升仓库版本号**:那个把 `changelog/unreleased/` 改名的 `release: X.Y.Z` PR,同时也要把
- 根目录及每个 `packages/*/package.json` 的 `version`、以及 core 的 `VERSION` 常量
- (`packages/core/src/index.ts`)提升到发布版本。发布工作流会拒绝版本号与仓库不一致的 tag 推送,
+ 根目录、每个 `packages/*/package.json` 与每个 `plugins/*/package.json` 的 `version`、以及 core 的
+ `VERSION` 常量(`packages/core/src/index.ts`)提升到发布版本。发布工作流会拒绝版本号与仓库不一致的 tag 推送,
因此漏掉提升会在发布任何东西之前就失败(v0.2.1 曾在仓库还是 0.2.0 时被打了 tag,此后每个开发构建
都在提示有更新,直到仓库追上为止)。
+- **发布分支要在打 tag 之前证明安装包能出来。** 分支命名为 `release/<version>`:每次推送到
+ `release/**` 分支都会运行 `desktop-build.yml`,并要求 macOS 与 Windows 签名,与发布工作流的调用方式
+ 一致;CI 从不演练签名。等分支最终 commit 上的这次运行通过后再合并、打 tag;tag 不会被移动,打完才发现
+ 的问题要用掉一个版本号(0.2.10 在 CI 全绿时打了 tag,因运行器镜像变化丢了 macOS 安装包,只得以 0.2.11
+ 重新发布)。在发布分支之外想补验一次:
+ `gh workflow run desktop-build.yml --ref <分支> -f require_macos_signing=true -f require_windows_signing=true`。
- `assets/readme/` 下的 README 素材是生成物——基准测试图表由落地页的基准数据生成,演示截图由
`node packages/landing/scripts/capture-readme-demo.mjs` 生成(需先构建;需要 Playwright chromium)。
请重新生成,而不要手工编辑。
diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml
index 35e7455c..6595c83b 100644
--- a/.github/workflows/desktop-build.yml
+++ b/.github/workflows/desktop-build.yml
@@ -10,6 +10,13 @@
# this workflow with require_macos_signing=true. Windows release installers are signed
# with EVSign when release.yml calls this workflow with require_windows_signing=true.
# Standalone dry-runs can still build unsigned artifacts when signing secrets are absent.
+#
+# A push to a `release/**` branch runs the same signed matrix on its own: signing depends on
+# the hosted runner image as much as on this repository, and CI never exercises it, so a
+# release branch proves its installers before the tag is cut. (0.2.10 was tagged on a green
+# CI and lost its macOS installers to a keychain change in the runner image two days old;
+# the code shipped again as 0.2.11.) Signing is required on that path, as it is for a
+# release, and the version stamp stays at the dev version — the tag's own run stamps it.
name: Desktop packages
on:
@@ -43,6 +50,8 @@ on:
# values: exactly the v0.2.2 release failure ("Missing macOS signing secrets"
# with all six configured). release.yml still passes `secrets: inherit` so
# repo-level secrets, if any, also remain visible.
+ push:
+ branches: ["release/**"]
workflow_dispatch:
inputs:
ref:
@@ -67,6 +76,11 @@ on:
default: false
env:
+ # Whether signing is required, decided once for every event: release.yml and a dispatch
+ # say so through the inputs, a push to a release branch always requires it. Steps read
+ # these instead of `inputs.*`, which is empty on a push.
+ REQUIRE_MACOS_SIGNING: ${{ (github.event_name == 'push' || inputs.require_macos_signing) && 'true' || 'false' }}
+ REQUIRE_WINDOWS_SIGNING: ${{ (github.event_name == 'push' || inputs.require_windows_signing) && 'true' || 'false' }}
# Keep in sync with release.yml (its header comment is the source of truth; duplicated
# here because reusable workflows do not inherit the caller's env).
MINGIT_VERSION: 2.55.0.3
@@ -156,7 +170,6 @@ jobs:
if: runner.os == 'macOS'
shell: bash
env:
- REQUIRE_MACOS_SIGNING: ${{ inputs.require_macos_signing && 'true' || 'false' }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
APPLE_API_KEY_BASE64: ${{ secrets.APPLE_API_KEY }}
@@ -218,7 +231,6 @@ jobs:
if: runner.os == 'Windows'
shell: pwsh
env:
- REQUIRE_WINDOWS_SIGNING: ${{ inputs.require_windows_signing && 'true' || 'false' }}
EVSIGN_KEY: ${{ secrets.EVSIGN_KEY }}
run: |
$ErrorActionPreference = "Stop"
@@ -278,15 +290,13 @@ jobs:
- name: Build packages
env:
- EVSIGN_REQUIRE: ${{ runner.os == 'Windows' && inputs.require_windows_signing && 'true' || 'false' }}
+ EVSIGN_REQUIRE: ${{ runner.os == 'Windows' && env.REQUIRE_WINDOWS_SIGNING == 'true' && 'true' || 'false' }}
EVSIGN_KEY: ${{ runner.os == 'Windows' && secrets.EVSIGN_KEY || '' }}
- run: pnpm --dir packages/desktop exec electron-builder ${{ matrix.args }} --publish never ${{ runner.os == 'macOS' && inputs.require_macos_signing && '-c.mac.forceCodeSigning=true' || '' }}
+ run: pnpm --dir packages/desktop exec electron-builder ${{ matrix.args }} --publish never ${{ runner.os == 'macOS' && env.REQUIRE_MACOS_SIGNING == 'true' && '-c.mac.forceCodeSigning=true' || '' }}
- name: Verify Windows signing and update metadata
if: runner.os == 'Windows'
shell: pwsh
- env:
- REQUIRE_WINDOWS_SIGNING: ${{ inputs.require_windows_signing && 'true' || 'false' }}
run: |
$ErrorActionPreference = "Stop"
@@ -415,7 +425,7 @@ jobs:
exit 0
- name: Notarize and staple macOS DMGs
- if: runner.os == 'macOS' && inputs.require_macos_signing
+ if: runner.os == 'macOS' && env.REQUIRE_MACOS_SIGNING == 'true'
shell: bash
run: |
set -euo pipefail
@@ -444,7 +454,7 @@ jobs:
done
- name: Clean macOS update metadata
- if: runner.os == 'macOS' && inputs.require_macos_signing
+ if: runner.os == 'macOS' && env.REQUIRE_MACOS_SIGNING == 'true'
shell: bash
run: |
set -euo pipefail
@@ -515,7 +525,7 @@ jobs:
NODE
- name: Verify macOS signing and notarization
- if: runner.os == 'macOS' && inputs.require_macos_signing
+ if: runner.os == 'macOS' && env.REQUIRE_MACOS_SIGNING == 'true'
shell: bash
run: |
set -euo pipefail
diff --git a/changelog/unreleased/2026-09-10-release-branch-signed-desktop-build.md b/changelog/unreleased/2026-09-10-release-branch-signed-desktop-build.md
new file mode 100644
index 00000000..868f959c
--- /dev/null
+++ b/changelog/unreleased/2026-09-10-release-branch-signed-desktop-build.md
@@ -0,0 +1,19 @@
+# A release branch builds its signed installers before the tag
+
+- **Date:** 2026-09-10
+- **Type:** process
+- **Scope:** `ci`, `desktop`
+- **PR:** [#670](https://github.com/Prism-Shadow/penguin-harness/pull/670)
+
+[中文版](2026-09-10-release-branch-signed-desktop-build.zh.md)
+
+`desktop-build.yml` now also runs on every push to a `release/**` branch, with macOS and Windows
+signing required, exactly as the release run will call it. Whether signing is required is decided
+once at the workflow level from the event and the inputs, and the steps read that instead of the
+inputs, which are empty on a push. The version stamp stays at the dev version on this path; the
+tag's own run stamps the release version.
+
+CI never exercised signing, and signing depends on the hosted runner image as much as on the
+repository: 0.2.10 was tagged on a green CI and lost its macOS installers to a change in the
+`macos-26` image two days old, so the code shipped again as 0.2.11. A release branch now proves
+its installers on its final commit, before the tag exists.
diff --git a/changelog/unreleased/2026-09-10-release-branch-signed-desktop-build.zh.md b/changelog/unreleased/2026-09-10-release-branch-signed-desktop-build.zh.md
new file mode 100644
index 00000000..38519a0e
--- /dev/null
+++ b/changelog/unreleased/2026-09-10-release-branch-signed-desktop-build.zh.md
@@ -0,0 +1,16 @@
+# 发布分支在打 tag 之前先构建签名安装包
+
+- **Date:** 2026-09-10
+- **Type:** process
+- **Scope:** `ci`, `desktop`
+- **PR:** [#670](https://github.com/Prism-Shadow/penguin-harness/pull/670)
+
+[English](2026-09-10-release-branch-signed-desktop-build.md)
+
+`desktop-build.yml` 现在也会在每次推送到 `release/**` 分支时运行,并要求 macOS 与 Windows 签名,
+与发布流程调用它的方式完全一致。是否要求签名改为在工作流层面根据事件和输入一次判定,各步骤读取该
+判定而不再读取推送事件下为空的输入。这条路径上的版本戳保持开发版本,发布版本由 tag 自己的那次运行盖上。
+
+CI 从不演练签名,而签名既取决于仓库也取决于托管运行器镜像:0.2.10 在 CI 全绿的情况下打了 tag,
+却因两天前更新的 `macos-26` 镜像丢掉了 macOS 安装包,代码只得以 0.2.11 重新发布。发布分支现在会在
+tag 出现之前,就在最终 commit 上证明它的安装包能出来。