diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 00419b4..21b8885 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -70,6 +70,7 @@ jobs: MACOS_NOTARY_ISSUER_ID: ${{ vars.MACOS_NOTARY_ISSUER_ID }} MACOS_NOTARY_KEY_ID: ${{ vars.MACOS_NOTARY_KEY_ID }} MACOS_NOTARY_KEY: ${{ secrets.MACOS_NOTARY_KEY }} + HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} - name: Upload snapshot dist (dry-run only) if: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 6197580..84602f0 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -62,6 +62,34 @@ nfpms: - rpm bindir: /usr/bin +homebrew_casks: + - name: try-bedazzled + binaries: + - try + repository: + owner: hmk + name: homebrew-tap + branch: main + token: "{{ .Env.HOMEBREW_TAP_TOKEN }}" + homepage: https://github.com/hmk/try-bedazzled + description: A beautiful, themeable directory manager for try experiments + license: BSD-3-Clause + commit_author: + name: goreleaserbot + email: bot@goreleaser.com + commit_msg_template: "chore(cask): bump try-bedazzled to {{ .Tag }}" + caveats: | + To enable the `try` shell function (so Enter actually `cd`s your shell), + add this line to your shell config: + + # bash / zsh + eval "$(try init)" + + # fish + try init | source + + Then restart your shell. + changelog: sort: asc filters: diff --git a/INSTALL.md b/INSTALL.md index bf673dc..93ed5e7 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,6 +1,14 @@ # Install -The fast path is the install script in the [README](README.md). This file covers the alternatives. +The fast paths are in the [README](README.md): Homebrew or the install script. This file covers the alternatives. + +## Homebrew + +```bash +brew install hmk/tap/try-bedazzled +``` + +This taps `hmk/homebrew-tap` (one-time) and installs the cask. Upgrades work via `brew upgrade try-bedazzled`. The cask prints a one-line shell-config snippet on install — see "Manual shell setup" at the bottom of this file if you missed it. ## Install script options diff --git a/README.md b/README.md index 7e31fee..a98dc1a 100644 --- a/README.md +++ b/README.md @@ -33,13 +33,21 @@ Type to filter. Press Enter to `cd`. Type a new name and press Enter to create. ## Install +**Homebrew** (macOS, Linux): + +```bash +brew install hmk/tap/try-bedazzled +``` + +**curl** (everywhere else): + ```bash curl -fsSL https://raw.githubusercontent.com/hmk/try-bedazzled/main/install.sh | sh ``` Then restart your shell (or `source ~/.zshrc`) and run `try`. -The installer downloads the latest release for your platform, drops the binary in `/usr/local/bin/`, and adds the shell function to your rc file. macOS binaries are signed and notarized. +The curl installer drops the signed-and-notarized binary in `/usr/local/bin/` and adds the shell function to your rc file. The Homebrew formula prints the same one-line shell-config snippet on first install (`brew info try-bedazzled`). For other install paths (Go, manual download, custom directory), see [INSTALL.md](INSTALL.md).