Skip to content

feat: add version flag and release packaging workflow#4

Merged
Defilan merged 1 commit into
defilantech:mainfrom
Defilan:feat/release-packaging
May 17, 2026
Merged

feat: add version flag and release packaging workflow#4
Defilan merged 1 commit into
defilantech:mainfrom
Defilan:feat/release-packaging

Conversation

@Defilan
Copy link
Copy Markdown
Member

@Defilan Defilan commented May 17, 2026

What

  • Adds version: "0.1.0" to CommandConfiguration, so mlx-server --version reports a version.
  • Adds .github/workflows/release.yml, a release workflow triggered on v* tags.
  • Drops the inaccurate "single static binary" line from the README goals.

Why

mlx-server has no GitHub releases and no install path beyond building from source with xcodebuild. This is the first half of giving it a real distribution story: a tagged release produces a downloadable artifact that a Homebrew formula can install.

The artifact is not a single binary. The runnable product is the xcodebuild Release output: the mlx-server executable plus its colocated resource bundles (mlx-swift_Cmlx.bundle carries the Metal default.metallib). A lone binary fails at runtime with Failed to load the default metallib, so the release tarball keeps the bundles next to the executable.

How

On a v* tag push the workflow:

  1. Builds with xcodebuild -configuration Release -skipMacroValidation (compiles the Metal shaders and copies the resource bundles).
  2. Packages mlx-server plus every *.bundle into mlx-server-<version>-macos-arm64.tar.gz.
  3. Creates a GitHub release with the tarball and a .sha256 companion.

The version string in CommandConfiguration is the assertion target for the upcoming Homebrew formula's test block.

Notes:

  • The first tagged release is a cold build. MLX C++ and the Metal shaders are expensive, so expect 20-40 minutes on the macos-15 runner; the SwiftPM and Xcode caches speed up later runs.
  • The binary carries only xcodebuild's ad-hoc signature. That is sufficient for a Homebrew formula (formula downloads are not quarantined). Developer ID signing and notarization are a later item.

A follow-up adds the mlx-server formula to defilantech/homebrew-tap, using the release tarball this workflow produces.

Add a `version: "0.1.0"` to CommandConfiguration so `mlx-server
--version` reports a version, and a release workflow that cuts a
GitHub release on every v* tag.

The release artifact is the xcodebuild Release product: the executable
plus its colocated resource bundles (mlx-swift_Cmlx.bundle carries the
Metal default.metallib). A lone binary fails at runtime with "Failed
to load the default metallib", so the tarball keeps the bundles next
to the executable. This is the artifact a Homebrew formula installs.

Signed-off-by: Christopher Maher <chris@mahercode.io>
@Defilan Defilan merged commit 3cdf769 into defilantech:main May 17, 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.

1 participant