Skip to content

Commit f8099cd

Browse files
authored
feat: Automatically update Homebrew (#147)
Signed-off-by: Drew Cain <[email protected]>
1 parent 688e0b0 commit f8099cd

File tree

2 files changed

+52
-4
lines changed

2 files changed

+52
-4
lines changed

.github/workflows/release.yml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,43 @@ 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+
<<<<<<< HEAD
61+
=======
62+
permissions:
63+
contents: write
64+
actions: read
65+
>>>>>>> 2b8ca1a (Update README with new website and community links)
66+
steps:
67+
- name: Update Homebrew formula
68+
uses: mislav/bump-homebrew-formula-action@v3
69+
with:
70+
# Formula name in homebrew-basic-memory repo
71+
formula-name: basic-memory
72+
# The tap repository
73+
homebrew-tap: basicmachines-co/homebrew-basic-memory
74+
# Base branch of the tap repository
75+
base-branch: main
76+
# Download URL will be automatically constructed from the tag
77+
download-url: https://github.com/basicmachines-co/basic-memory/archive/refs/tags/${{ github.ref_name }}.tar.gz
78+
# Commit message for the formula update
79+
commit-message: |
80+
{{formulaName}} {{version}}
81+
<<<<<<< HEAD
82+
83+
Created by https://github.com/basicmachines-co/basic-memory/actions/runs/${{ github.run_id }}
84+
env:
85+
# Personal Access Token with repo scope for homebrew-basic-memory repo
86+
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TOKEN }}
87+
=======
88+
89+
Created by https://github.com/basicmachines-co/basic-memory/actions/runs/${{ github.run_id }}
90+
env:
91+
# Personal Access Token with repo scope for homebrew-basic-memory repo
92+
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TOKEN }}
93+
>>>>>>> 2b8ca1a (Update README with new website and community links)

CLAUDE.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,21 @@ 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
@@ -243,4 +252,4 @@ Basic Memory uses `uv-dynamic-versioning` for automatic version management based
243252
- **CI/CD**: GitHub Actions handles building and PyPI publication
244253

245254
## Development Notes
246-
- make sure you sign off on commits
255+
- make sure you sign off on commits

0 commit comments

Comments
 (0)