Skip to content

ci: build the macOS dmg on GitHub's macOS runner - #99

Merged
kewang merged 3 commits into
spekhq:masterfrom
MnHung:ci/macos-dmg
Oct 28, 2026
Merged

kewang merged 3 commits into
spekhq:masterfrom
MnHung:ci/macos-dmg

Conversation

@MnHung

@MnHung MnHung commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds .github/workflows/mac.yml. When a release is published (or on demand, for a given tag), a hosted macos-latest runner runs the same npm run dist:mac the build Mac runs, uploads the arm64 dmg as a workflow artifact, and then runs npm run probe:package:mac against it. Nothing is attached to the release: the maintainer puts the dmg from a green run into release/ and runs npm run release:github as before (now also written in CONTRIBUTING). The token is contents: read.

The probe gates the run. Its two agent checks need claude, so the workflow installs it (pinned, not signed in) after the dmg is uploaded; nothing it brings can reach the artifact. The runner allows UI scripting, so the keystroke, Cmd+Q and close-dialog checks run too. The probe's result goes to the run summary and its log is uploaded. The runner's measured behaviour is recorded in docs/lessons/macos.md (items 21–23).

Tested on my fork with workflow_dispatch for v0.2.24 (release commit c0d42a7): run 40501610608 at this PR's head af9125d, 33/33.

Not tested:

  • The release: published trigger. GitHub reads the workflow from the release's own commit, so it fires only for releases cut after this file is on master; for earlier releases use workflow_dispatch with the tag.
  • If the probe aborts outright (for example the app does not launch), the summary shows only FAILED (k/n); the cause is in the uploaded log.

Related issue

Fixes #73. See also #98.

Which area(s)?

  • Terminal / sessions
  • OpenSpec side panel
  • Files (tree, viewer, editor)
  • Inbox, Slack, or agent handoffs
  • Keyboard shortcuts
  • Packaging / installation
  • Docs / build / tooling

Checklist

  • npm test passes — run on macOS only: 2592 pass, 18 fail, all in Linux-only suites (desktop entry install, watchers, pty working directory); this PR changes no source. The Linux result is upstream CI's.
  • npm run typecheck and npm run lint pass (also npm run build and npm run measure:bundle)
  • If this changes UI behavior, I ran the relevant npm run probe:* (see CONTRIBUTING → Testing) — probe:package:mac: 33/33 locally on an Apple M3 and 33/33 on the runner
  • New code, comments, and docs are in English
  • I followed the contributing guidelines and matched the surrounding code style

🤖 Generated with Claude Code

https://claude.ai/code/session_01FUu5otMQRyP8XPWx9QnyoB

MnHung and others added 3 commits October 27, 2026 19:53
A release's Apple Silicon dmg is built by `npm run dist:mac` on a hosted
macos-latest runner when the release is published, or on demand for a given
tag. The dmg is uploaded as a workflow artifact only; attaching it to the
release stays a maintainer step, so a run publishes nothing by itself.

probe:package:mac runs after the build but does not gate it: the runner has
no `claude`, so its two agent checks fail there. The other 31 passed on
macos-26-arm64, keystroke checks included. Its result goes to the run
summary and its log is uploaded next to the dmg.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FUu5otMQRyP8XPWx9QnyoB
The probe ran but could not fail the run: without `claude` on the runner,
its two agent checks always failed, so a broken dmg looked the same as a good
one. claude is now installed after the dmg is uploaded, and the probe step
gates the job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FUu5otMQRyP8XPWx9QnyoB
…o do

CONTRIBUTING's release order now names the workflow as an alternative to the
build Mac. docs/lessons/macos.md gains the runner's measurements (direct
Electron download, UI scripting allowed, claude found in ~/.local/bin), which
the workflow's comments cite. The /usr/local/bin link is dropped: the
runner's login shell already finds ~/.local/bin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FUu5otMQRyP8XPWx9QnyoB
@MnHung

MnHung commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Updated after a review pass:

  • The probe now gates the run. claude is installed after the dmg is uploaded, so all 33 checks can pass on the runner (33/33 at af9125d); before, two checks always failed and a broken dmg would have looked the same as a good one.
  • CONTRIBUTING's release order names the workflow as an alternative to the build Mac.
  • docs/lessons/macos.md records what the runner was measured to do; the workflow's comments now cite that instead of item 7.
  • The description now says what was not tested (the release: published trigger) and the macOS-only npm test result.

@kewang
kewang merged commit 26726e6 into spekhq:master Oct 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build the macOS artifact on CI instead of one person's Mac

2 participants