Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

test(release): assert macOS signing is opt-in instead of tag-forced

LiYaoc7278ecdd5ab
diff --git a/apps/desktop/test/ci-workflow.test.mjs b/apps/desktop/test/ci-workflow.test.mjs
index b1124653f..adbe18b1f 100644
--- a/apps/desktop/test/ci-workflow.test.mjs
+++ b/apps/desktop/test/ci-workflow.test.mjs
@@ -208,16 +208,26 @@ test("release matrix packages both native macOS architectures", () => {
assert.match(releaseWorkflowSource, /Merge macOS updater metadata[\s\S]*?ruby/);
});
-test("macOS release signing is required on tag pushes", () => {
+test("macOS release signing is opt-in and workflow_dispatch still honours sign_macos", () => {
assert.match(
releaseWorkflowSource,
/workflow_dispatch:\s+inputs:\s+sign_macos:[\s\S]*?default:\s*true[\s\S]*?type:\s*boolean/,
);
+ // A tag push must not force signing: a fork owns no Apple Developer
+ // secrets, and the guard below pins APPLE_TEAM_ID to the upstream
+ // maintainer's team, so no locally obtained certificate can satisfy it.
+ // Signing is opted into with the repository variable, and the manual
+ // dispatch lane keeps its own sign_macos input.
assert.ok(
releaseWorkflowSource.includes(
- "MACOS_SIGN_RELEASE: ${{ github.event_name != 'workflow_dispatch' || inputs.sign_macos == true }}",
+ "MACOS_SIGN_RELEASE: ${{ (github.event_name == 'workflow_dispatch' && inputs.sign_macos == true) || vars.MACOS_SIGN_RELEASE == 'true' }}",
),
);
+ assert.doesNotMatch(
+ releaseWorkflowSource,
+ /MACOS_SIGN_RELEASE: \$\{\{ github\.event_name != 'workflow_dispatch'/,
+ "a tag push no longer forces macOS signing",
+ );
const unsignedBlock = releaseWorkflowSource.match(
/- name: Package unsigned macOS installer[\s\S]*?(?=\n - name:)/,