From f8099cd00401437ff1b36633744859515c316fb7 Mon Sep 17 00:00:00 2001 From: Drew Cain Date: Wed, 18 Jun 2025 21:54:49 -0500 Subject: [PATCH] feat: Automatically update Homebrew (#147) Signed-off-by: Drew Cain --- .github/workflows/release.yml | 41 ++++++++++++++++++++++++++++++++++- CLAUDE.md | 15 ++++++++++--- 2 files changed, 52 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index be59e8cb..cc7ec65a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,4 +51,43 @@ jobs: - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - password: ${{ secrets.PYPI_TOKEN }} \ No newline at end of file + password: ${{ secrets.PYPI_TOKEN }} + + homebrew: + name: Update Homebrew Formula + needs: release + runs-on: ubuntu-latest +<<<<<<< HEAD +======= + permissions: + contents: write + actions: read +>>>>>>> 2b8ca1a (Update README with new website and community links) + steps: + - name: Update Homebrew formula + uses: mislav/bump-homebrew-formula-action@v3 + with: + # Formula name in homebrew-basic-memory repo + formula-name: basic-memory + # The tap repository + homebrew-tap: basicmachines-co/homebrew-basic-memory + # Base branch of the tap repository + base-branch: main + # Download URL will be automatically constructed from the tag + download-url: https://github.com/basicmachines-co/basic-memory/archive/refs/tags/${{ github.ref_name }}.tar.gz + # Commit message for the formula update + commit-message: | + {{formulaName}} {{version}} +<<<<<<< HEAD + + Created by https://github.com/basicmachines-co/basic-memory/actions/runs/${{ github.run_id }} + env: + # Personal Access Token with repo scope for homebrew-basic-memory repo + COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TOKEN }} +======= + + Created by https://github.com/basicmachines-co/basic-memory/actions/runs/${{ github.run_id }} + env: + # Personal Access Token with repo scope for homebrew-basic-memory repo + COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TOKEN }} +>>>>>>> 2b8ca1a (Update README with new website and community links) diff --git a/CLAUDE.md b/CLAUDE.md index 1f038a87..014f1366 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -228,12 +228,21 @@ Basic Memory uses `uv-dynamic-versioning` for automatic version management based - Includes comprehensive quality checks (lint, format, type-check, tests) - Automatically updates version in `__init__.py` - Creates git tag and pushes to GitHub -- Triggers GitHub Actions workflow for PyPI publication -- Users install with: `pip install basic-memory` +- Triggers GitHub Actions workflow for: + - PyPI publication + - Homebrew formula update (requires HOMEBREW_TOKEN secret) **Manual method (legacy):** - Create version tag: `git tag v0.13.0 && git push origin v0.13.0` +#### Homebrew Formula Updates +- Automatically triggered after successful PyPI release +- Updates formula in `basicmachines-co/homebrew-basic-memory` repo +- Requires `HOMEBREW_TOKEN` secret in GitHub repository settings: + - Create a fine-grained Personal Access Token with `Contents: Read and Write` and `Actions: Read` scopes on `basicmachines-co/homebrew-basic-memory` + - Add as repository secret named `HOMEBREW_TOKEN` in `basicmachines-co/basic-memory` +- Formula updates include new version URL and SHA256 checksum + ### For Development - **Automated releases**: Use `just release v0.13.x` for stable releases and `just beta v0.13.0b1` for beta releases - **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 - **CI/CD**: GitHub Actions handles building and PyPI publication ## Development Notes -- make sure you sign off on commits \ No newline at end of file +- make sure you sign off on commits