Skip to content

Commit 8d6fea7

Browse files
Grivnclaude
andcommitted
Add release pipeline: GoReleaser, Homebrew tap, and community files
Set up automated release infrastructure so that tagging a version triggers cross-platform builds, GitHub Releases, and Homebrew formula updates. Also adds --version flag, CONTRIBUTING.md, and CHANGELOG.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e59b936 commit 8d6fea7

7 files changed

Lines changed: 203 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Go
18+
uses: actions/setup-go@v5
19+
with:
20+
go-version: "1.24"
21+
22+
- name: Build
23+
run: make build
24+
25+
- name: Run E2E tests
26+
run: make test
27+
28+
release:
29+
needs: test
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0
35+
36+
- name: Set up Go
37+
uses: actions/setup-go@v5
38+
with:
39+
go-version: "1.24"
40+
41+
- name: Run GoReleaser
42+
uses: goreleaser/goreleaser-action@v6
43+
with:
44+
distribution: goreleaser
45+
version: "~> v2"
46+
args: release --clean
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ vendor/
2323
# Test artifacts
2424
/tmp/
2525
.testdata/
26+
27+
# GoReleaser
28+
dist/

.goreleaser.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
2+
version: 2
3+
4+
before:
5+
hooks:
6+
- go mod tidy
7+
8+
builds:
9+
- id: mnemon
10+
main: .
11+
binary: mnemon
12+
env:
13+
- CGO_ENABLED=0
14+
ldflags:
15+
- -s -w -X github.com/mnemon-dev/mnemon/cmd.version={{.Version}}
16+
goos:
17+
- linux
18+
- darwin
19+
- windows
20+
goarch:
21+
- amd64
22+
- arm64
23+
ignore:
24+
- goos: windows
25+
goarch: arm64
26+
27+
archives:
28+
- id: default
29+
format: tar.gz
30+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
31+
format_overrides:
32+
- goos: windows
33+
format: zip
34+
35+
checksum:
36+
name_template: "checksums.txt"
37+
38+
changelog:
39+
sort: asc
40+
filters:
41+
exclude:
42+
- "^docs:"
43+
- "^test:"
44+
- "^ci:"
45+
- "^chore:"
46+
- "^Merge"
47+
48+
brews:
49+
- repository:
50+
owner: mnemon-dev
51+
name: homebrew-tap
52+
token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
53+
directory: Formula
54+
homepage: "https://github.com/mnemon-dev/mnemon"
55+
description: "Persistent memory for LLM agents"
56+
license: "MIT"
57+
test: |
58+
system "#{bin}/mnemon", "--version"
59+
install: |
60+
bin.install "mnemon"
61+
62+
release:
63+
github:
64+
owner: mnemon-dev
65+
name: mnemon
66+
draft: false
67+
prerelease: auto
68+
name_template: "v{{.Version}}"

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Changelog
2+
3+
All notable changes to Mnemon will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
- Release pipeline: GoReleaser, GitHub Actions, Homebrew tap
12+
- `--version` flag
13+
- CONTRIBUTING.md, CHANGELOG.md
14+
15+
## [0.1.0] - TBD
16+
17+
Initial public release.
18+
19+
### Added
20+
- Core CRUD: `remember`, `recall`, `forget`, `search`, `status`, `log`
21+
- Four-graph architecture: temporal, entity, causal, semantic edges
22+
- Intent-aware smart recall with beam search graph traversal
23+
- Built-in deduplication and conflict resolution
24+
- Retention lifecycle: importance decay, access-count boosting, garbage collection
25+
- Optional embedding support via Ollama (`nomic-embed-text`)
26+
- Knowledge graph visualization (`mnemon viz`)
27+
- Claude Code integration via hooks (prime, remind, nudge, compact)
28+
- OpenClaw integration via skill deployment
29+
- `mnemon setup` interactive installer with `--eject` support
30+
- Comprehensive documentation with Chinese translations
31+
32+
[Unreleased]: https://github.com/mnemon-dev/mnemon/compare/v0.1.0...HEAD
33+
[0.1.0]: https://github.com/mnemon-dev/mnemon/releases/tag/v0.1.0

CONTRIBUTING.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Contributing to Mnemon
2+
3+
Thank you for considering contributing to Mnemon!
4+
5+
## Development Setup
6+
7+
```bash
8+
git clone https://github.com/mnemon-dev/mnemon.git
9+
cd mnemon
10+
make build
11+
```
12+
13+
## Running Tests
14+
15+
```bash
16+
make test
17+
```
18+
19+
This runs the full E2E test suite (`scripts/e2e_test.sh`).
20+
21+
## Submitting Changes
22+
23+
1. Fork the repository and create a feature branch from `master`.
24+
2. Make your changes and ensure `make test` passes.
25+
3. Open a pull request against `master`.
26+
27+
## Releasing
28+
29+
Releases are fully automated. Maintainers tag and push:
30+
31+
```bash
32+
git tag v0.2.0
33+
git push origin v0.2.0
34+
```
35+
36+
This triggers GitHub Actions → runs tests → builds cross-platform binaries via GoReleaser → publishes a GitHub Release → updates the Homebrew tap.
37+
38+
## License
39+
40+
By contributing, you agree that your contributions will be licensed under the [MIT License](LICENSE).

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# ──────────────────────────────────────────────────────────────────────
44

55
BINARY := mnemon
6+
VERSION ?= dev
7+
LDFLAGS := -s -w -X github.com/mnemon-dev/mnemon/cmd.version=$(VERSION)
68
GOBIN := $(shell go env GOBIN)
79
ifeq ($(GOBIN),)
810
GOBIN := $(shell go env GOPATH)/bin
@@ -15,7 +17,7 @@ endif
1517
# ── Build ────────────────────────────────────────────────────────────
1618

1719
build: ## Build the mnemon binary
18-
go build -o $(BINARY) .
20+
go build -ldflags "$(LDFLAGS)" -o $(BINARY) .
1921

2022
# ── Install / Uninstall ─────────────────────────────────────────────
2123

cmd/root.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,16 @@ import (
88
"github.com/spf13/cobra"
99
)
1010

11+
// version is set at build time via ldflags.
12+
var version = "dev"
13+
1114
var dataDir string
1215

1316
var rootCmd = &cobra.Command{
14-
Use: "mnemon",
15-
Short: "Memory daemon for LLM agents",
16-
Long: "Mnemon is a standalone memory daemon based on MAGMA's four-graph architecture.",
17+
Use: "mnemon",
18+
Version: version,
19+
Short: "Memory daemon for LLM agents",
20+
Long: "Mnemon is a standalone memory daemon based on MAGMA's four-graph architecture.",
1721
}
1822

1923
func Execute() {

0 commit comments

Comments
 (0)