get2knowio / get2knowio/homebrew-tap

Auto-update formulae when new versions are published to PyPI

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Background

This tap will host two categories of formulae:

1. **First-party** — projects owned by get2knowio (e.g. `climax-mcp`), where the publish workflow lives in our own repos and we can trigger cross-repo events
2. **Third-party** — formulae for external projects where we have no control over the publish pipeline

Each category needs a different update strategy.

## First-party formulae (e.g. `climax-mcp`)

Use `repository_dispatch` for immediate, event-driven updates:

- In the app repo's publish workflow, after pushing to PyPI, fire a `repository_dispatch` event to this tap repo passing the new version
- This tap listens for that event, runs `brew update-python-resources` to regenerate resource blocks, commits, and pushes
- Requires a PAT with `repo` scope stored as a secret in each app repo

## Third-party formulae

Use a scheduled workflow that polls PyPI:

- Run hourly (or daily) via cron
- For each third-party formula, fetch `https://pypi.org/pypi//json` and compare latest version to what's in the formula
- If a new version is detected, run `brew update-python-resources` and open a PR (rather than committing directly, so there's a chance to review/test before merging)

## Implementation notes

- `brew update-python-resources Formula/.rb` handles regenerating all transitive dependency resource blocks automatically — the workflow just needs to bump the top-level `url` and `sha256` first
- Both strategies should open a PR rather than push directly to `main`, so the bottling CI (see #1) can run and attach bottles before merge
- The third-party polling workflow should be idempotent — skip cleanly if the formula is already at the latest version

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.