diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..82f373d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release + +on: + push: + tags: + - 'v*' + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-go@v5 + with: + go-version: '1.25' + + - uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: '~> v2' + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..8adbcf7 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,57 @@ +version: 2 + +project_name: lore + +before: + hooks: + - go mod tidy + +builds: + - id: lore + main: ./cmd/lore + binary: lore + env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + goarch: + - amd64 + - arm64 + ldflags: + - -s -w -X github.com/zpenka/lore.Version={{.Version}} + +archives: + - id: default + formats: [tar.gz] + name_template: >- + {{ .ProjectName }}_ + {{- .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else }}{{ .Arch }}{{ end }} + +checksum: + name_template: checksums.txt + +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" + - "^ci:" + - "^chore:" + - Merge pull request + - Merge branch + +brews: + - name: lore + repository: + owner: zpenka + name: homebrew-lore + token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" + homepage: https://github.com/zpenka/lore + description: Keyboard-driven TUI for browsing Claude Code session history + license: MIT + install: bin.install "lore" + test: system "#{bin}/lore", "--version" diff --git a/README.md b/README.md index d381a42..2feab21 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,10 @@ A keyboard-driven TUI for browsing Claude Code session history. ## Quick start ```bash -# Install +# Install via Homebrew (macOS / Linux) +brew install zpenka/lore/lore + +# Or install via Go toolchain go install github.com/zpenka/lore/cmd/lore@latest # Or build from source diff --git a/lore.go b/lore.go index 64fc6ee..01055d9 100644 --- a/lore.go +++ b/lore.go @@ -12,8 +12,9 @@ import ( tea "github.com/charmbracelet/bubbletea" ) -// Version is the lore binary version. Bumped manually until we wire releases. -const Version = "0.5.0" +// Version is the lore binary version. Set at build time via ldflags by GoReleaser; +// falls back to the literal below for local builds. +var Version = "0.7.0" // Run is the entry point used by cmd/lore/main.go. func Run() error {