|
| 1 | +# Homebrew Tap Deployment Checklist |
| 2 | + |
| 3 | +Use this checklist to complete the Homebrew tap deployment setup. |
| 4 | + |
| 5 | +## ✅ Completed (in this PR) |
| 6 | + |
| 7 | +- [x] Updated `.github/workflows/deploy-tap.yml` with improved CD strategy |
| 8 | +- [x] Added formula validation (`brew audit` and `brew style`) |
| 9 | +- [x] Added support for version tag bumps |
| 10 | +- [x] Added tap repository bootstrap logic |
| 11 | +- [x] Changed runner to macOS (required for Homebrew tools) |
| 12 | +- [x] Updated `HOMEBREW.md` with deployment details |
| 13 | +- [x] Created `SETUP_INSTRUCTIONS.md` with step-by-step guide |
| 14 | +- [x] Created `TAP_REPO_SETUP.md` with tap repository configuration |
| 15 | +- [x] Created `PR_SUMMARY.md` with overview of changes |
| 16 | + |
| 17 | +## 🔲 Next Steps (after PR merge) |
| 18 | + |
| 19 | +### 1. Add Repository Secret |
| 20 | + |
| 21 | +**In the main repository** (sbryngelson/MFC or MFlowCode/MFC after PR merge): |
| 22 | + |
| 23 | +- [ ] Go to GitHub → (your repository) → Settings → Secrets and variables → Actions |
| 24 | +- [ ] Click "New repository secret" |
| 25 | +- [ ] Name: `TAP_REPO_TOKEN` |
| 26 | +- [ ] Value: Create a Personal Access Token: |
| 27 | + 1. GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic) |
| 28 | + 2. Click "Generate new token (classic)" |
| 29 | + 3. Scopes: Check `repo` |
| 30 | + 4. Copy the generated token |
| 31 | + 5. Paste into the secret value |
| 32 | +- [ ] Click "Add secret" |
| 33 | + |
| 34 | +**Detailed instructions**: See `SETUP_INSTRUCTIONS.md` section 1-2 |
| 35 | + |
| 36 | +### 2. Initialize Tap Repository |
| 37 | + |
| 38 | +**At https://github.com/MFlowCode/homebrew-mfc**: |
| 39 | + |
| 40 | +Choose one: |
| 41 | +- [ ] **Option A**: Click "Add a README" in GitHub UI to create first commit |
| 42 | +- [ ] **Option B**: Let the workflow bootstrap automatically on first run |
| 43 | + |
| 44 | +### 3. Configure Tap Repository |
| 45 | + |
| 46 | +**At https://github.com/MFlowCode/homebrew-mfc/settings/actions**: |
| 47 | + |
| 48 | +- [ ] Under "Workflow permissions": |
| 49 | + - [ ] Select "Read and write permissions" |
| 50 | + - [ ] Check "Allow GitHub Actions to create and approve pull requests" |
| 51 | +- [ ] Click "Save" |
| 52 | + |
| 53 | +### 4. Add Bottle Workflow to Tap |
| 54 | + |
| 55 | +**Create `.github/workflows/bottle.yml` in the tap repository**: |
| 56 | + |
| 57 | +- [ ] Copy the workflow from `TAP_REPO_SETUP.md` (section "Bottling Workflow") |
| 58 | +- [ ] Commit to the tap repository's `main` branch |
| 59 | + |
| 60 | +Alternatively, let the first formula sync complete, then add the workflow for subsequent updates. |
| 61 | + |
| 62 | +### 5. Test the Deployment |
| 63 | + |
| 64 | +**Test formula sync**: |
| 65 | +- [ ] Edit `packaging/homebrew/mfc.rb` (make a trivial change) |
| 66 | +- [ ] Push to your branch |
| 67 | +- [ ] Check Actions tab - workflow should run and sync to tap |
| 68 | +- [ ] Verify formula appears at https://github.com/MFlowCode/homebrew-mfc/blob/main/Formula/mfc.rb |
| 69 | + |
| 70 | +**Test version bump** (optional): |
| 71 | +- [ ] Create a test tag: `git tag v5.1.0-test && git push origin v5.1.0-test` |
| 72 | +- [ ] Check that workflow updates URL and sha256 |
| 73 | +- [ ] Delete test tag if not needed |
| 74 | + |
| 75 | +### 6. Verify Installation |
| 76 | + |
| 77 | +**Test end-to-end installation**: |
| 78 | +```bash |
| 79 | +# Add tap |
| 80 | +brew tap MFlowCode/mfc |
| 81 | + |
| 82 | +# Install MFC |
| 83 | +brew install MFlowCode/mfc/mfc |
| 84 | + |
| 85 | +# Verify |
| 86 | +mfc --help |
| 87 | +which pre_process simulation post_process |
| 88 | +``` |
| 89 | + |
| 90 | +## 📋 Reference Documentation |
| 91 | + |
| 92 | +- **Setup Guide**: `SETUP_INSTRUCTIONS.md` - Complete setup walkthrough |
| 93 | +- **Tap Configuration**: `TAP_REPO_SETUP.md` - Tap repository setup and bottle workflow |
| 94 | +- **PR Overview**: `PR_SUMMARY.md` - Summary of changes and rationale |
| 95 | +- **User Guide**: `HOMEBREW.md` - End-user installation and usage documentation |
| 96 | + |
| 97 | +## 🔧 Troubleshooting |
| 98 | + |
| 99 | +### Workflow fails with "Permission denied" |
| 100 | +- Verify `TAP_REPO_TOKEN` secret is set in the main repository |
| 101 | +- Check that the token has `repo` scope |
| 102 | +- Ensure the token hasn't expired |
| 103 | + |
| 104 | +### Formula fails audit |
| 105 | +- Read the error message in the Actions log |
| 106 | +- Common fixes: |
| 107 | + - Update sha256 checksum if source tarball changed |
| 108 | + - Fix Ruby syntax errors |
| 109 | + - Add missing dependencies |
| 110 | + |
| 111 | +### Tap repository not found |
| 112 | +- Initialize the tap repository (Step 2 above) |
| 113 | +- Check repository name is exactly `MFlowCode/homebrew-mfc` |
| 114 | + |
| 115 | +### Bottles don't build |
| 116 | +- Verify Actions are enabled in tap repository (Step 3 above) |
| 117 | +- Check that `.github/workflows/bottle.yml` exists in tap |
| 118 | +- Review Actions logs in the tap repository |
| 119 | + |
| 120 | +## 🎉 Success Criteria |
| 121 | + |
| 122 | +You'll know everything is working when: |
| 123 | +- ✅ Formula syncs automatically when you push changes |
| 124 | +- ✅ Version tags trigger automatic formula bumps |
| 125 | +- ✅ Bottles build for macOS 13 (x86_64) and macOS 14 (arm64) |
| 126 | +- ✅ Users can install with: `brew install MFlowCode/mfc/mfc` |
| 127 | +- ✅ Installation is fast (uses pre-built bottles, not compilation) |
| 128 | + |
| 129 | +## 📞 Need Help? |
| 130 | + |
| 131 | +See the documentation files in `packaging/homebrew/`: |
| 132 | +- Start with `SETUP_INSTRUCTIONS.md` for step-by-step guidance |
| 133 | +- Check `TAP_REPO_SETUP.md` for tap-specific configuration |
| 134 | +- Review `PR_SUMMARY.md` for implementation details |
| 135 | + |
0 commit comments