diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9a01821..8f039b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,4 +27,20 @@ jobs: args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }} + + - name: Locate Homebrew cask + id: homebrew + shell: bash + run: | + set -euo pipefail + cask="$(find dist -name 'cpm.rb' -print -quit)" + [ -n "$cask" ] || { echo '::error::cpm.rb not found in dist'; exit 1; } + echo "cask=$cask" >> "$GITHUB_OUTPUT" + + - name: Publish Homebrew cask + uses: open-cli-collective/.github/actions/homebrew-alias@v1 + with: + canonical-cask-file: ${{ steps.homebrew.outputs.cask }} + canonical-token: cpm + tap-repo: open-cli-collective/homebrew-tap + tap-token: ${{ secrets.TAP_GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index fd2f936..24b1a9c 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -58,17 +58,17 @@ archives: # Homebrew cask with auto-quarantine removal for unsigned binaries homebrew_casks: - name: cpm + skip_upload: true repository: owner: open-cli-collective name: homebrew-tap - token: "{{ .Env.TAP_GITHUB_TOKEN }}" homepage: https://github.com/open-cli-collective/cpm description: "TUI for managing Claude Code plugins" - binary: cpm + binaries: [cpm] hooks: post: install: | - system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/cpm"] + run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "cpm"], base: :staged_path caveats: | cpm has been installed. Run 'cpm --help' for usage.