Skip to content

Latest commit

 

History

History
91 lines (68 loc) · 3.35 KB

RELEASE.md

File metadata and controls

91 lines (68 loc) · 3.35 KB

Releasing gojo

gojo uses goreleaser (v2) to cross-build binaries, publish a GitHub Release, and auto-update the Homebrew cask and Scoop manifest.

The cask and Scoop manifest live in this same repo at Casks/gojo.rb and gojo.json — there are no separate package repositories or PATs to manage. The default GITHUB_TOKEN (granted contents: write by the release workflow) is enough to commit both back into hackrdotsh/gojo.

Prerequisites

  • The repo hackrdotsh/gojo must be public (Homebrew can't install from private repos without per-user credentials).
  • Actions must be enabled (they are by default).

That's it — no setup steps.

Releasing

The VERSION file at the repo root is the single source of truth for the version number. Before bumping it, move every Unreleased entry into the new version/date section in both CHANGELOG.md and ../gojo-www/CHANGELOG.md. Keep the two product changelogs synchronized before tagging. To release:

# 1. bump VERSION (it must match the tag, minus the leading `v`).
#    The flake app also refreshes flake.nix's vendorHash if it is stale.
nix run .#bump -- minor   # …or major / patch / explicit X.Y.Z
git add VERSION flake.nix   # (whichever changed)

# 2. commit and tag
git commit -m "chore: release v1.0.0"
git tag v1.0.0
git push origin v1.0.0

The goreleaser before hook errors if VERSION != the tag, so they can't drift silently. The release workflow then:

  1. Builds gojo for linux/{amd64,arm64}, darwin/{amd64,arm64}, and windows/{amd64,arm64}.
  2. Stamps main.version via ldflags (gojo --version → gojo 1.0.0).
  3. Builds distro packages via nfpm:
    • Arch Linux — .pkg.tar.zst (pacman -U install)
    • Debian/Ubuntu — .deb (apt install)
    • Fedora/RHEL — .rpm (dnf install)
    • openSUSE — same .rpm (zypper install)
  4. Publishes tarballs, Windows ZIPs, distro packages + checksums to the GitHub Release.
  5. Generates Casks/gojo.rb and commits it back to main in this repo.
  6. Generates the root gojo.json Scoop manifest and commits it back to main.

Installing (end users)

Windows:

scoop bucket add gojo https://github.com/hackrdotsh/gojo
scoop install gojo/gojo

The Scoop manifest installs jj as a runtime dependency.

macOS:

brew tap hackrdotsh/gojo https://github.com/hackrdotsh/gojo
brew install --cask gojo

The explicit URL is required because Homebrew's brew tap <user>/<repo> shorthand only auto-discovers repos named homebrew-<repo>. Since the cask lives here instead of in a homebrew-gojo repo, the URL must be given. (This is the only downside of the single-repo setup; it trades one extra line at install time for not maintaining a second repo + PAT.)

This also installs jj (jujutsu) as a runtime dependency. The cask prints a caveat with instructions for creating the optional gj shorthand alias.

Debian/Ubuntu: grab the .deb from the GitHub release and apt install ./<file>.deb. jujutsu is recommended (auto-installed on Debian 13+/Ubuntu 24.10+), not required.

Fedora/RHEL: grab the .rpm from the GitHub release and dnf install ./<file>.rpm.

openSUSE: same .rpm via zypper install ./<file>.rpm.

Arch Linux: grab the .pkg.tar.zst from the GitHub release and pacman -U it (jujutsu comes in automatically as a dependency).