Skip to content

Commit 90f1967

Browse files
committed
feat: Automatically update Homebrew
Signed-off-by: Drew Cain <drew@basicmachines.co>
1 parent 3fdce68 commit 90f1967

2 files changed

Lines changed: 38 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,29 @@ jobs:
5151
- name: Publish to PyPI
5252
uses: pypa/gh-action-pypi-publish@release/v1
5353
with:
54-
password: ${{ secrets.PYPI_TOKEN }}
54+
password: ${{ secrets.PYPI_TOKEN }}
55+
56+
homebrew:
57+
name: Update Homebrew Formula
58+
needs: release
59+
runs-on: ubuntu-latest
60+
steps:
61+
- name: Update Homebrew formula
62+
uses: mislav/bump-homebrew-formula-action@v3
63+
with:
64+
# Formula name in homebrew-basic-memory repo
65+
formula-name: basic-memory
66+
# The tap repository
67+
homebrew-tap: basicmachines-co/homebrew-basic-memory
68+
# Base branch of the tap repository
69+
base-branch: main
70+
# Download URL will be automatically constructed from the tag
71+
download-url: https://github.com/basicmachines-co/basic-memory/archive/refs/tags/${{ github.ref_name }}.tar.gz
72+
# Commit message for the formula update
73+
commit-message: |
74+
{{formulaName}} {{version}}
75+
76+
Created by https://github.com/basicmachines-co/basic-memory/actions/runs/${{ github.run_id }}
77+
env:
78+
# Personal Access Token with repo scope for homebrew-basic-memory repo
79+
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TOKEN }}

CLAUDE.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,16 +228,25 @@ Basic Memory uses `uv-dynamic-versioning` for automatic version management based
228228
- Includes comprehensive quality checks (lint, format, type-check, tests)
229229
- Automatically updates version in `__init__.py`
230230
- Creates git tag and pushes to GitHub
231-
- Triggers GitHub Actions workflow for PyPI publication
232-
- Users install with: `pip install basic-memory`
231+
- Triggers GitHub Actions workflow for:
232+
- PyPI publication
233+
- Homebrew formula update (requires HOMEBREW_TOKEN secret)
233234

234235
**Manual method (legacy):**
235236
- Create version tag: `git tag v0.13.0 && git push origin v0.13.0`
236237

238+
#### Homebrew Formula Updates
239+
- Automatically triggered after successful PyPI release
240+
- Updates formula in `basicmachines-co/homebrew-basic-memory` repo
241+
- Requires `HOMEBREW_TOKEN` secret in GitHub repository settings:
242+
- Create a fine-grained Personal Access Token with `Contents: Read and Write` and `Actions: Read` scopes on `basicmachines-co/homebrew-basic-memory`
243+
- Add as repository secret named `HOMEBREW_TOKEN` in `basicmachines-co/basic-memory`
244+
- Formula updates include new version URL and SHA256 checksum
245+
237246
### For Development
238247
- **Automated releases**: Use `just release v0.13.x` for stable releases and `just beta v0.13.0b1` for beta releases
239248
- **Quality gates**: All releases require passing lint, format, type-check, and test suites
240249
- **Version management**: Versions automatically derived from git tags via `uv-dynamic-versioning`
241250
- **Configuration**: `pyproject.toml` uses `dynamic = ["version"]`
242251
- **Release automation**: `__init__.py` updated automatically during release process
243-
- **CI/CD**: GitHub Actions handles building and PyPI publication
252+
- **CI/CD**: GitHub Actions handles building and PyPI publication

0 commit comments

Comments
 (0)