Skip to content

Your home as a live 3D model in the Mac menu bar and on iPhone — lights and ACs via Smart Life, Home Assistant, Philips Hue and Apple Home.

Build release images on GitHub Actions, signed ad hoc with provenance

0xProbability8c4cb91019c0
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..ef059ad
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,88 @@
+# Builds the Mac app on GitHub's machines and attaches the disk image to a draft release.
+#
+# Push a tag v<version> (the version in ios/Config/Base.xcconfig) → a draft release with
+# HouseControl-<version>.dmg and its SHA-256 appears under Releases; publish it by hand.
+# Run it from the Actions tab instead → the same image as a downloadable artifact, no release.
+#
+# The app is signed ad hoc, not with a Developer ID, so no personal certificate ever leaves a
+# developer's Mac. Instead, on a public repository every image carries a build provenance
+# attestation: `gh attestation verify <dmg> --repo 0xProbabillity/house-control` proves it was
+# built here, by this workflow, from the tagged commit.
+
+name: Release
+
+on:
+ push:
+ tags: ["v*"]
+ workflow_dispatch:
+
+permissions: {}
+
+concurrency:
+ group: release-${{ github.ref }}
+ cancel-in-progress: false
+
+jobs:
+ mac:
+ name: Mac app
+ runs-on: macos-15
+ timeout-minutes: 30
+ permissions:
+ contents: write # create the draft release
+ id-token: write # sign the provenance attestation
+ attestations: write # store it
+ steps:
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
+
+ - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
+ with:
+ node-version: 22
+ cache: npm
+ cache-dependency-path: web/package-lock.json
+
+ - uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
+
+ - name: Check the tag matches the app version
+ id: version
+ run: |
+ version="$(sed -n 's/^MARKETING_VERSION *= *//p' ios/Config/Base.xcconfig)"
+ echo "version=$version" >> "$GITHUB_OUTPUT"
+ if [ "$GITHUB_REF_TYPE" = tag ] && [ "$GITHUB_REF_NAME" != "v$version" ]; then
+ echo "::error::Tag $GITHUB_REF_NAME does not match MARKETING_VERSION $version in ios/Config/Base.xcconfig"
+ exit 1
+ fi
+
+ - name: Install the web UI's packages
+ run: npm ci --prefix web --no-audit --no-fund
+
+ - name: Build the app and the disk image
+ run: UNSIGNED=1 ./scripts/release-mac.sh
+
+ - name: Attest build provenance
+ if: github.event.repository.visibility == 'public'
+ uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
+ with:
+ subject-path: build/HouseControl-${{ steps.version.outputs.version }}.dmg
+
+ - name: Keep the image (manual runs)
+ if: github.ref_type != 'tag'
+ uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
+ with:
+ name: HouseControl-${{ steps.version.outputs.version }}
+ path: |
+ build/HouseControl-${{ steps.version.outputs.version }}.dmg
+ build/HouseControl-${{ steps.version.outputs.version }}.dmg.sha256
+ retention-days: 7
+ if-no-files-found: error
+
+ - name: Create a draft release
+ if: github.ref_type == 'tag'
+ env:
+ GH_TOKEN: ${{ github.token }}
+ VERSION: ${{ steps.version.outputs.version }}
+ run: |
+ gh release create "$GITHUB_REF_NAME" --draft --verify-tag \
+ --title "House Control $VERSION" --generate-notes \
+ "build/HouseControl-$VERSION.dmg" "build/HouseControl-$VERSION.dmg.sha256"
diff --git a/README.md b/README.md
index beccddb..0498638 100644
--- a/README.md
+++ b/README.md
@@ -39,12 +39,44 @@ No frameworks, no Electron, no server, no account of its own.
## Download
-Get the latest `HouseControl-<version>.dmg` from [Releases](https://github.com/0xProbabillity/house-control/releases),
-open it and drag **House Control** into **Applications**. It is signed and notarized by Apple and runs on any Mac
-with macOS 13 or newer, Apple silicon or Intel. Open it from Applications and look for the house in the menu bar;
-to start it with your Mac, add it under **System Settings → General → Login Items**.
+1. Get `HouseControl-<version>.dmg` from [Releases](https://github.com/0xProbabillity/house-control/releases).
+ It runs on macOS 13 or newer, Apple silicon and Intel.
+2. Open it and drag **House Control** into **Applications**.
+3. Open **House Control** from Applications. The first time, macOS stops it with *“Apple could not verify…”*,
+ because the app is not signed with a paid Apple Developer ID (see [why](#why-the-app-is-not-notarized)).
+ Allow it once:
+ - **macOS 15 Sequoia and newer:** click **Done**, open **System Settings → Privacy & Security**, scroll down
+ to *“House Control was blocked…”*, click **Open Anyway** and confirm with your password.
+ - **macOS 13–14:** Control-click the app in Applications, choose **Open**, then **Open** again.
+ - Or, in Terminal: `xattr -dr com.apple.quarantine "/Applications/House Control.app"`
+4. Look for the house in the menu bar — there is no Dock icon and no window. Click it.
+
+It starts with a bundled demo plan, so you can try everything before connecting anything. Then:
+[make it your home](#make-it-your-home) and [connect real devices](#connect-real-devices).
+To start it with your Mac, add it under **System Settings → General → Login Items**.
+
+### Check what you downloaded
+
+Every release image is built by [GitHub Actions](.github/workflows/release.yml) from the tagged commit — not on
+anyone's Mac — and comes with its SHA-256 and a signed build provenance attestation:
-To build it yourself instead, read on.
+```bash
+shasum -a 256 -c HouseControl-<version>.dmg.sha256
+gh attestation verify HouseControl-<version>.dmg --repo 0xProbabillity/house-control
+```
+
+The second command proves the image was built by this repository's workflow, and shows from which commit.
+
+### Why the app is not notarized
+
+Notarizing needs an Apple Developer ID, and that certificate carries a person's legal name inside every copy of
+the app. House Control ships signed ad hoc instead, and earns trust the open-source way: the code is all here,
+the release is built in public, and you can [build it yourself](#build-and-run) in a couple of minutes.
+
+### Remove it
+
+Quit it (right-click the menu bar icon → **Quit**), delete **House Control** from Applications and, to remove your
+plan and connections too, `~/Library/Application Support/HouseControl/`.
## Requirements
@@ -254,7 +286,7 @@ web/ the UI: Three.js scene, panel, island, editor, AI Access window and th
core/ what both apps share: Smart Life and Tuya clients, plan store, Mac ⇄ iPhone sync, the AI gateway (SwiftPM, with tests)
macos/ the Mac shell: menu bar item, panel, island and editor windows (SwiftPM)
ios/ the iPhone shell: SwiftUI, generated into an Xcode project by XcodeGen
-scripts/ build-app.sh, build-ios.sh and ios-sim.sh build the apps, release-mac.sh makes the notarized .dmg,
+scripts/ build-app.sh, build-ios.sh and ios-sim.sh build the apps, release-mac.sh makes the .dmg,
make-icon.swift and make-dmg-background.swift draw the icon and the disk image's window
tools/lab pretend Home Assistant, Hue Bridge and HomeKit bridge for testing without hardware
docs/ floor plan reference, connection guides, screenshots
@@ -321,13 +353,19 @@ The binary has a few offline self-checks and one read-only diagnostic:
### Releasing the Mac app
+Set `MARKETING_VERSION` in `ios/Config/Base.xcconfig`, commit, then tag and push:
+
```bash
-ASC_KEY_ID=… ASC_ISSUER_ID=… ./scripts/release-mac.sh --publish
+git tag v0.1.0 && git push origin v0.1.0
```
-builds a universal app, signs it with your **Developer ID Application** certificate, has Apple notarize it, packs
-it into `build/HouseControl-<version>.dmg` and attaches that to a GitHub release. The script lists what it needs;
-`UNSIGNED=1` makes a test image without any of it.
+[`release.yml`](.github/workflows/release.yml) builds the universal app on a GitHub macOS runner
+(`UNSIGNED=1 ./scripts/release-mac.sh`), attests its provenance and opens a **draft** release with the disk image
+and its SHA-256. Check it, then publish the draft. Running the workflow by hand from the Actions tab builds the same
+image as a downloadable artifact without a release.
+
+With an Apple Developer ID of your own, `ASC_KEY_ID=… ASC_ISSUER_ID=… ./scripts/release-mac.sh --publish` builds a
+signed and notarized image locally instead; the script lists what it needs.
## Limitations
diff --git a/scripts/release-mac.sh b/scripts/release-mac.sh
index c79ebaa..c58025d 100755
--- a/scripts/release-mac.sh
+++ b/scripts/release-mac.sh
@@ -11,8 +11,8 @@
# ASC_KEY_ID, ASC_ISSUER_ID (key file AuthKey_<id>.p8 in ~/.appstoreconnect/private_keys)
# or a profile stored with `xcrun notarytool store-credentials`: NOTARY_PROFILE=<name>.
# uv (brew install uv), which runs dmgbuild to lay out the disk image.
-# UNSIGNED=1 skips signing and notarization: a disk image for testing the layout only —
-# macOS will refuse to open the app in it until the user allows it in System Settings.
+# UNSIGNED=1 skips the certificate and notarization: the app stays signed ad hoc. This is the image
+# .github/workflows/release.yml publishes; macOS asks people to allow it once (see README → Download).
# The version is MARKETING_VERSION in ios/Config/Base.xcconfig, shared with the iPhone app.
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
@@ -67,7 +67,7 @@ if [ -z "${UNSIGNED:-}" ]; then
echo "▸ Checking it the way Gatekeeper will"
spctl --assess --type open --context context:primary-signature --verbose=2 "$DMG"
fi
-shasum -a 256 "$DMG" | tee "$DMG.sha256"
+(cd "$(dirname "$DMG")" && shasum -a 256 "$(basename "$DMG")") | tee "$DMG.sha256"
echo "✓ $DMG"
if [ "${1:-}" = "--publish" ]; then