diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..75aef5a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,43 @@ +name: macOS release + +on: + push: + tags: + - "v*" + +permissions: + contents: write + +jobs: + apple-silicon-dmg: + runs-on: macos-latest + timeout-minutes: 35 + steps: + - uses: actions/checkout@v7 + + - uses: actions/setup-node@v6 + with: + node-version: 22 + cache: npm + + - uses: dtolnay/rust-toolchain@stable + with: + targets: aarch64-apple-darwin + + - run: npm ci + + - name: Build and publish DMG + uses: tauri-apps/tauri-action@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tagName: ${{ github.ref_name }} + releaseName: Touch Manager ${{ github.ref_name }} + releaseBody: | + Apple Silicon development preview. + + This build is not Apple-notarized. On first launch, Control-click Touch Manager and choose Open. Install dfu-util separately with Homebrew before flashing hardware. + prerelease: true + args: --target aarch64-apple-darwin --bundles dmg + releaseAssetNamePattern: Touch-Manager_[version]_[arch].[ext] + uploadUpdaterSignatures: false diff --git a/README.md b/README.md index 643ad4e..3a2b6f5 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,20 @@ BOOT/RESET recovery path. The full architecture, threat model, target profiles, TouchLink proposal, and phased roadmap are in [BUILD_PLAN.md](BUILD_PLAN.md). +## Download + +Download the latest macOS installer from +[GitHub Releases](https://github.com/alibros/touch-manager/releases). + +The current preview is built for Apple Silicon Macs. It is ad-hoc signed rather than +Apple-notarized, so first launch may require Control-clicking the app, choosing **Open**, +or approving it in **System Settings → Privacy & Security**. Install `dfu-util` with +`brew install dfu-util` before writing firmware. + +Release builds contain the firmware catalog but do not redistribute upstream firmware +binaries. Users can import a `.bin` directly or provide the Synthux firmware workspace +described below. + ## Safety model The frontend cannot supply a shell command, arbitrary address, or DFU alternate setting. @@ -71,9 +85,9 @@ Resolution order: 1. `SYNTHUX_WORKSPACE` 2. An ancestor of the current working directory -3. `~/dev/synthux` for Finder-launched local macOS builds -For a custom checkout location: +For a custom checkout location, set the workspace explicitly when starting the development +build: ```sh export SYNTHUX_WORKSPACE=/absolute/path/to/synthux @@ -101,9 +115,10 @@ without requiring or redistributing those binaries. npm run tauri -- build ``` -Local macOS bundles are development artifacts. Public downloads must be signed with an -Apple Developer ID and notarized. Windows releases need explicit WinUSB guidance, and -Linux releases need narrow udev rules; those distribution tasks remain on the roadmap. +Current macOS downloads are clearly labelled development previews. A polished stable +release still requires Apple Developer ID signing and notarization. Windows releases need +explicit WinUSB guidance, and Linux releases need narrow udev rules; those distribution +tasks remain on the roadmap. ## Buttonless updates diff --git a/src-tauri/src/catalog.rs b/src-tauri/src/catalog.rs index 86eff57..574ec15 100644 --- a/src-tauri/src/catalog.rs +++ b/src-tauri/src/catalog.rs @@ -91,21 +91,11 @@ fn discover_workspace_root() -> Option { } } - let from_current_directory = env::current_dir().ok().and_then(|cwd| { + env::current_dir().ok().and_then(|cwd| { cwd.ancestors() .find(|candidate| candidate.join("Firmware/SHA256SUMS.txt").is_file()) .map(PathBuf::from) - }); - if from_current_directory.is_some() { - return from_current_directory; - } - - // Finder-launched macOS applications do not inherit the terminal's working - // directory. Keep the source workspace discoverable for local installations. - env::var_os("HOME") - .map(PathBuf::from) - .map(|home| home.join("dev/synthux")) - .filter(|candidate| candidate.join("Firmware/SHA256SUMS.txt").is_file()) + }) } #[allow(dead_code)]