Skip to content

bootstrap: Phase C — release pipeline + install.sh - #3

Merged
ironystock merged 9 commits into
mainfrom
feat/phase-c-release-pipeline
Apr 18, 2026
Merged

ironystock merged 9 commits into
mainfrom
feat/phase-c-release-pipeline

Conversation

@ironystock

Copy link
Copy Markdown
Contributor

Summary

Phase C of the rememberize-cli public-repo bootstrap. Wires up the release pipeline, CI, and install UX so that tagging vX.Y.Z on main produces signed archives, a Homebrew formula, a Scoop manifest, and a GitHub release — with a curl-able install.sh for everyone else.

Depends on Phase A (PR #1) being merged first for the cmd/rememberize source layout and the var version = "dev" hook that ldflags populates.

Files added

  • .goreleaser.yml — goreleaser v2 config. Pure-Go cross-compile (darwin/linux amd64+arm64, windows amd64), tar.gz + zip archives, sha256 checksums, GitHub release with auto prerelease detection, Homebrew tap push (captured-ventures/homebrew-rememberize), Scoop bucket push (captured-ventures/scoop-rememberize).
  • .github/workflows/ci.yml — three jobs on PR + push to main: test (vet + race tests), build-matrix (ubuntu/macos/windows sanity build), lint (golangci-lint).
  • .github/workflows/release.yml — tag-triggered (v*). Runs goreleaser via the official action. Uses a RELEASE_PAT secret so it can push cross-repo to the tap/bucket.
  • install.sh — POSIX curl-installer. Detects OS+arch, resolves latest release via the GitHub API (no jq), downloads + extracts + installs into $HOME/.local/bin (or $INSTALL_DIR). Works in Git Bash/MSYS/WSL on Windows.
  • .golangci.yml — minimal lint config: govet, staticcheck, ineffassign, errcheck, gofmt.
  • Makefile — dev convenience: build, test, lint, install-dev, clean, release-snapshot.

Validation

  • goreleaser check .goreleaser.yml → passes (one soft deprecation warning: brews will eventually become homebrew_casks; left as-is per spec).
  • goreleaser build --snapshot --single-target → builds cleanly, version stamp flows through.
  • sh -n install.sh → syntax OK.
  • CGO_ENABLED=0 go build ./... + go vet ./... → clean.

Manual steps for Brad (post-merge)

These cannot be automated from inside the repo:

  1. Create the RELEASE_PAT secret in rememberize-cli repo settings → Secrets and variables → Actions. Classic PAT with repo scope, issued from an account that has write access to captured-ventures/homebrew-rememberize and captured-ventures/scoop-rememberize (create those two empty repos first if they don't exist).
  2. Configure branch protection on main: require test, lint, and the three build-matrix checks to pass before merge; require PRs; disallow force-push.
  3. Set up rememberize.app/install.sh → raw.githubusercontent.com redirect (Cloudflare Pages _redirects or worker).

Out of scope

  • Cutting v0.1.0 (Brad does this after Phase A + B + C land on main)
  • README install-section rewrite (owned by Phase D)
  • Agent onboarding docs (Phase D)

Commits

  1. chore(release): .goreleaser.yml for multi-platform builds + Homebrew/Scoop taps
  2. ci: lint + test + cross-platform build matrix on PR
  3. ci(release): goreleaser workflow on tag push
  4. feat: install.sh curl-installer
  5. chore: Makefile + .golangci.yml for dev convenience

Test plan

  • CI green on this PR (test + lint + build-matrix × 3)
  • After Phase A + B + C merge, tag v0.1.0-rc1 on main and confirm:
    • Release workflow runs to completion
    • Archives + checksums attached to the GitHub release
    • Homebrew formula PRed to homebrew-rememberize
    • Scoop manifest PRed to scoop-rememberize
  • curl -sSL .../install.sh | sh on macOS + Linux + Git Bash
  • brew install captured-ventures/rememberize/rememberize works after tap lands
  • scoop bucket add rememberize ... && scoop install rememberize works after bucket lands

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

ironystock and others added 5 commits April 18, 2026 02:09
…Scoop taps

Goreleaser v2 config for rememberize-cli:
- Pure-Go builds (CGO_ENABLED=0) for darwin/linux amd64+arm64 and windows amd64
- ldflags inject main.version from the tag
- tar.gz archives for darwin/linux, zip for windows
- sha256 checksums file
- Homebrew formula pushed to captured-ventures/homebrew-rememberize
- Scoop manifest pushed to captured-ventures/scoop-rememberize
- GitHub release: auto prerelease detection based on tag pattern

Validated with `goreleaser check` and `goreleaser build --snapshot --single-target`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three jobs on pull_request to main and push to main:
- test: go vet + go test -race on ubuntu-latest
- build-matrix: CGO_ENABLED=0 go build on ubuntu/macos/windows to catch platform regressions
- lint: golangci-lint via the official action

Go version is pulled from go.mod via actions/setup-go so CI stays in sync with the module.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Triggers on v* tags. Runs goreleaser/goreleaser-action@v6 with --clean,
fetch-depth: 0 for changelog history.

Uses a RELEASE_PAT secret (classic PAT with repo scope) instead of the
default GITHUB_TOKEN, since goreleaser pushes formulas/manifests to the
captured-ventures/homebrew-rememberize and captured-ventures/scoop-rememberize
repos — cross-repo writes require a PAT or GitHub App token.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
POSIX sh installer for macOS, Linux, and Windows (Git Bash/WSL/MSYS).

- Detects OS via uname -s (Darwin/Linux/MINGW*/MSYS*/CYGWIN* → darwin/linux/windows)
- Detects arch via uname -m (x86_64/amd64 → amd64, arm64/aarch64 → arm64)
- Resolves latest release from the GitHub API (no jq — grep+sed)
- Honors INSTALL_DIR (default \$HOME/.local/bin), VERSION, REPO env overrides
- Downloads via curl or wget, extracts tar.gz or zip, drops binary at INSTALL_DIR
- Prints post-install guidance (PATH hint, --version, pair command)
- Fails fast with clean error messages at every stage

Canonical endpoint: curl -sSL https://rememberize.app/install.sh | sh
Fallback: curl -sSL https://raw.githubusercontent.com/captured-ventures/rememberize-cli/main/install.sh | sh

Validated with sh -n.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Makefile targets:
- build         build bin/rememberize with dev version stamp
- test          go test -race ./...
- lint          golangci-lint run
- install-dev   build + copy to \$INSTALL_DIR (default ~/.local/bin)
- clean         remove bin/ and dist/
- release-snapshot  goreleaser release --snapshot --clean (local dry-run)

.golangci.yml enables a minimal set: govet, staticcheck, ineffassign, errcheck, gofmt.
Kept tight on purpose — the CLI is small and we'd rather not fight noise linters.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ironystock and others added 4 commits April 18, 2026 02:45
golangci-lint v1.64.8 (pulled by action@v6 with version=latest) was built
against Go 1.24 and rejects configs targeting Go 1.25+. Pin to v2.1.6 via
golangci-lint-action@v8, migrate .golangci.yml to v2 format (default: none
instead of disable-all, gofmt moved to formatters section).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
v2.1.6 was still built with Go 1.24. v2.11.4 (latest, 2026-03-22)
is built against Go 1.25 and accepts the 1.25.5 go.mod target.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fmt.Fprint* to stdout/stderr and Close() on response bodies / config
files are not actionable errors in a CLI. Standard exclusions match
the Go community's common practice for CLI projects.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Wrap multipart writer Write/WriteField/Close with error handling
  in the import path — malformed uploads were a real risk.
- Explicit _,_ ignore on os.Stdout.Write (export-to-stdout path).
- t.Fatalf on json.Unmarshal failure in pair_test.go (was silently
  swallowed).
- Convert sb.WriteString(fmt.Sprintf(...)) to fmt.Fprintf(&sb, ...)
  in memory_md formatter (staticcheck QF1012).
- gofmt all touched files.

Local go build + go test pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ironystock
ironystock merged commit f7818e3 into main Apr 18, 2026
5 checks passed
@ironystock
ironystock deleted the feat/phase-c-release-pipeline branch April 18, 2026 17:37
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