php-framework/docs/publish/homebrew.md
Snider f831fd6846 docs: restructure with Build/Publish sections and dynamic nav
- Move PHP and Go framework docs from /packages/ to /build/
- Move CLI docs from /packages/go/cmd/ to /build/cli/
- Add /publish/ section with docs for all release publishers:
  GitHub, Docker, npm, Homebrew, Scoop, AUR, Chocolatey, LinuxKit
- Add sidebar navigation for /publish/ section
- Update nav with Build, Publish, Deploy dropdowns
- Remove changelog, contributing, guide, and security sections
- Make sidebar auto-discover from packages, build, publish, deploy dirs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 22:20:32 +00:00

1.8 KiB

Homebrew

Publish to Homebrew for macOS and Linux package management.

Configuration

publishers:
  - type: homebrew
    tap: org/homebrew-tap

Options

Option Description Default
tap Tap repository (org/homebrew-tap) Required
formula Formula name Project name
homepage Project homepage Repository URL
description Package description From project
license License identifier Auto-detected
dependencies Homebrew dependencies []

Examples

Basic Formula

publishers:
  - type: homebrew
    tap: host-uk/homebrew-tap

With Dependencies

publishers:
  - type: homebrew
    tap: host-uk/homebrew-tap
    dependencies:
      - git
      - go

Custom Description

publishers:
  - type: homebrew
    tap: host-uk/homebrew-tap
    description: "CLI for building and deploying applications"
    homepage: https://core.host.uk.com

Environment Variables

Variable Description
GITHUB_TOKEN Token with repo access to tap (required)

Setup

  1. Create a tap repository: org/homebrew-tap

  2. Ensure your GITHUB_TOKEN has push access to the tap

  3. After publishing, users install with:

    brew tap org/tap
    brew install myapp
    

Generated Formula

class Myapp < Formula
  desc "CLI for building and deploying applications"
  homepage "https://github.com/org/myapp"
  version "1.2.3"
  license "MIT"

  on_macos do
    if Hardware::CPU.arm?
      url "https://github.com/org/myapp/releases/download/v1.2.3/myapp_darwin_arm64.tar.gz"
      sha256 "abc123..."
    else
      url "https://github.com/org/myapp/releases/download/v1.2.3/myapp_darwin_amd64.tar.gz"
      sha256 "def456..."
    end
  end

  def install
    bin.install "myapp"
  end
end