# macOS Release

## Overview

This page documents the process for releasing OpenClaw on macOS using Sparkle auto-updates. Release builds require Developer ID signing, packaging, and appcast publication.

## Key Requirements

The following prerequisites are required:

- A Developer ID Application certificate must be installed
- The Sparkle private key path needs configuration via `SPARKLE_PRIVATE_KEY_FILE`
- Notary credentials are required for Gatekeeper-safe distribution
- `pnpm` dependencies must be installed
- Sparkle tools are automatically fetched through SwiftPM

## Build Process

Developers should use specific scripts depending on their needs:

- `scripts/package-mac-app.sh` handles local and development packaging
- `scripts/package-mac-dist.sh` creates release artifacts including zip files, disk images, and notarization

### Build Parameters

| Parameter | Description |
|-----------|-------------|
| `APP_BUILD` | Must be numeric + monotonic for Sparkle compare |
| `APP_VERSION` | Semantic version string |
| Architecture | Target CPU architecture specification |

## Appcast and Publishing

After building, generate appcast entries using:

```bash
scripts/make_appcast.sh
```

This creates formatted HTML release notes from the changelog.

### Final Steps

1. Upload assets to GitHub releases
2. Verify that the appcast URL functions correctly
3. Confirm package URLs are accessible
4. Test the update flow end-to-end
