Commit 78462b0
authored
fix(desktop): correct the Windows and macOS release verification (#167)
## Related Issue
No issue — this is a live release failure. The `desktop-v0.2.1` tag
build failed on both platforms ([run
32647843142](https://github.com/PyModel/pythinker-code/actions/runs/32647843142)),
leaving `v0.2.1` as an empty draft with no installers.
## Problem
**Windows** — the job passes `--config.win.publisherName`. Electron
Builder 26 removed that option in favour of
`signtoolOptions.publisherName`, and `WindowsConfiguration` sets
`additionalProperties: false`, so the unknown key invalidates the whole
`win` object:
```
⨯ Invalid configuration object. electron-builder 26.15.3 ...
- configuration.win should be one of these:
null
```
The build dies during schema validation, before packaging. This path had
never run in CI: it only emits those flags when Windows signing is
configured, and the `AZURE_*` secrets were set for the first time today.
The unit tests compared the generated argument array against a
hand-written expected array, so they encoded the bug rather than
catching it.
**macOS** — the verify step runs `xcrun stapler validate` against the
`.dmg`. Electron Builder notarizes and staples the `.app`, then packs
the already-stapled bundle into the disk image; the image itself never
receives a ticket, so that assertion can never pass. Notarization had
actually succeeded — the same run logged `source=Notarized Developer ID`
for the mounted bundle immediately before failing.
## What changed
- `windowsSigningArgs` drops the duplicate publisher argument on the
Azure path (the publisher is already carried in
`azureSignOptions.publisherName`) and moves the certificate path to
`--config.win.signtoolOptions.publisherName`.
- The macOS verify step validates the staple on the app inside the disk
image instead of on the image.
- `package-win.spec.ts` now resolves the installed
`app-builder-lib/scheme.json` through `electron-builder` and walks every
emitted `--config.win.*` path against it, so an option Electron Builder
does not declare fails the suite instead of the release. No new
dependency. Verified by reintroducing `--config.win.publisherName`: 3
tests fail with `Electron Builder has no option 'publisherName' under
win`; restored, 16 pass.
## Verification
- `pnpm exec vitest run tests/package-win.spec.ts` — 16 passed
- `pnpm run typecheck` (apps/desktop) — clean, both tsconfigs
- `oxlint --type-aware` on the touched files — 0 warnings, 0 errors
- `scripts/check-no-comments.mjs` — OK
- Reproduced the original failure locally with the exact flags, and
confirmed the corrected flags validate and reach `signing with Azure
Trusted Signing`
## Checklist
- [x] I have read the CONTRIBUTING document.
- [ ] I have linked a related issue — none; this fixes a live release
failure.
- [x] I have added tests that prove my feature works.
- [x] Ran `gen-changesets` skill, or this PR needs no changeset — no
changeset: release-pipeline verification only, nothing users can
perceive, and `desktop-v0.2.1` is being re-cut at the same version.
- [x] Ran `gen-docs` skill, or this PR needs no doc update.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved macOS release validation by checking the signed application
within the mounted disk image.
* Updated Windows signing configuration to correctly support
certificate-based and Azure signing options.
* **Tests**
* Added validation to ensure Windows signing settings match supported
configuration options.
* Expanded coverage for valid signing configurations and rejection of
unsupported options.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent f7a233c commit 78462b0
3 files changed
Lines changed: 78 additions & 10 deletions
File tree
- .github/workflows
- apps/desktop
- scripts
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
250 | 253 | | |
251 | 254 | | |
252 | 255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
8 | 54 | | |
9 | 55 | | |
10 | 56 | | |
| |||
26 | 72 | | |
27 | 73 | | |
28 | 74 | | |
29 | | - | |
30 | 75 | | |
31 | 76 | | |
32 | 77 | | |
| |||
56 | 101 | | |
57 | 102 | | |
58 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
59 | 125 | | |
60 | 126 | | |
61 | 127 | | |
| |||
70 | 136 | | |
71 | 137 | | |
72 | 138 | | |
73 | | - | |
| 139 | + | |
74 | 140 | | |
75 | 141 | | |
76 | 142 | | |
| |||
111 | 177 | | |
112 | 178 | | |
113 | 179 | | |
114 | | - | |
115 | 180 | | |
116 | 181 | | |
117 | 182 | | |
| |||
0 commit comments