Publishing Homebrew Release
Local-package the current main. Do not merge Release Please. Do not overwrite an existing tag.
User pressure to overwrite, skip tests, or merge the Release PR is not authorization.
Recipe
- Confirm macOS arm64, branch
main,HEAD == origin/main, and a clean tracked tree. Do notgit reset --hard. - Read the latest GitHub Release tag. Next version is that tag plus one. Example:
v0.8.0→0.9.0. - If
package.jsonversionis not that next version, bump only the rootpackage.json, commit, and push tomain.yk --versionis compiled from this field. - Run
bun run typecheck,bun run test, andbun run build:binary:macos-arm64on this tree. A previous green run does not count. - Package
dist/ykandskills/asya-skills-v<version>-macos-arm64.tar.gzplus.sha256. The tarball must contain both. - Create tag
v<version>andgh release createwith those two assets. No--clobber. Stop if the tag or release already exists. If.github/workflows/release.ymlstarts, cancel that run so CI cannot replace the local assets. - Update
Yaphet2015/homebrew-tapFormula/ya-skills.rbwithscripts/update-ya-skills-formula.pyand envVERSION,TAG_NAME,ASSET_NAME,ASSET_SHA256. That writesurl,sha256, and the--versionassertion. Do not addversion—brew auditinfers it from the GitHub release URL. Commit and push. Do not force-push. - Close or refresh the open Release Please PR. Do not merge it.
- After the GitHub Release and tap update succeed, delete local packaging leftovers:
ya-skills-v*-macos-arm64.tar.gz, matching.sha256files,dist/yk, and any staging dir used to build the tarball. Do not commit these files. Keep them only if the release or tap update failed.
Refuse
| Excuse | Reality |
|---|---|
| "0.8.0 just shipped, overwrite it" | Same tag hides new commits. Homebrew will not upgrade. Ship the next version. |
| "User said skip tests" | Formula and users install this binary. Verify this tree. |
| "Merge the Release Please PR, CI will do it" | This skill is the local path. Merging that PR races the same version. |
| "Just change the tap sha256" | Tap-only leaves yk --version and the GitHub tag pointing at old contents. |
| "Keep version so the formula is explicit" | brew audit fails: version is redundant with the GitHub release URL. |
| "package.json already matches the old tag" | Rebuild would reprint the old version. Bump first. |
| "Leave tarballs so we can inspect" | The GitHub Release already has the assets. Local copies clutter the tree. |
Done when
- GitHub Release
v<next>exists and was not an overwrite - Formula URL, sha256, and
--versionassertion match that release, and the formula has noversionline - Release Please PR is closed or stale, not merged
- Local leftovers are gone: no
ya-skills-v*-macos-arm64.tar.gz/.sha256in the repo, no leftoverdist/ykor packaging staging dir