-
Notifications
You must be signed in to change notification settings - Fork 58
docs: sync requirements and release playbook #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,66 +1,28 @@ | ||
| # sag Homebrew Release Playbook | ||
|
|
||
| Lightweight flow to ship sag via the `steipete/tap` Homebrew tap (source build). | ||
| The `Release Binaries` workflow updates `steipete/homebrew-tap` after it uploads and verifies release assets. Do not edit the tap formula as a normal release step. | ||
|
|
||
| ## 0) Prereqs | ||
| - macOS with Homebrew installed. | ||
| - Clean git tree on `main`. | ||
| - Go toolchain installed (Go version from `go.mod`). | ||
| - Access to tap repo sibling at `../homebrew-tap`. | ||
| ## Normal flow | ||
|
|
||
| ## 1) Verify build is green | ||
| ```sh | ||
| pnpm format | ||
| pnpm lint | ||
| pnpm test | ||
| pnpm build | ||
| ``` | ||
|
|
||
| ## 2) Bump the version in code | ||
| - Update `Version` in `cmd/root.go`. | ||
| - Update `CHANGELOG.md` entry to match. | ||
| 1. Push the annotated `vX.Y.Z` tag after the release commit is on `main`. | ||
| 2. Watch `Release Binaries` through its `update-homebrew-tap` job. | ||
| 3. Confirm the dispatched `Update Formula` run succeeds in `steipete/homebrew-tap`. | ||
| 4. Inspect `Formula/sag.rb`: its versioned artifact URLs and SHA-256 values must match the GitHub release assets and checksum manifest. | ||
| 5. Sanity-check install from tap: | ||
|
|
||
| ## 3) Tag & push | ||
| ```sh | ||
| git commit -am "release: vX.Y.Z" | ||
| git tag vX.Y.Z | ||
| git push origin main --tags | ||
| brew update | ||
| brew reinstall steipete/tap/sag | ||
| brew test steipete/tap/sag | ||
| sag --version | ||
| ``` | ||
|
|
||
| ## 4) Update the Homebrew tap formula | ||
| In `../homebrew-tap/Formula/sag.rb`: | ||
| ## Recovery | ||
|
|
||
| 1. Set `version "X.Y.Z"`. | ||
| 2. Set `url` to the tag source tarball: | ||
| ``` | ||
| url "https://github.com/steipete/sag/archive/refs/tags/vX.Y.Z.tar.gz" | ||
| ``` | ||
| 3. Update `sha256` for that tarball: | ||
| ```sh | ||
| curl -L -o /tmp/sag.tar.gz https://github.com/steipete/sag/archive/refs/tags/vX.Y.Z.tar.gz | ||
| shasum -a 256 /tmp/sag.tar.gz | ||
| ``` | ||
| 4. Ensure build step uses: | ||
| ```ruby | ||
| system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/sag" | ||
| ``` | ||
| If the release assets exist but the tap update failed, fix the release workflow or tap workflow and rerun `Release Binaries` for the existing tag: | ||
|
|
||
| Commit/push in tap repo: | ||
| ```sh | ||
| git commit -am "sag vX.Y.Z" | ||
| git push origin main | ||
| ``` | ||
|
|
||
| ## 5) Sanity-check install from tap | ||
| ```sh | ||
| brew uninstall sag || true | ||
| brew untap steipete/tap || true | ||
| brew tap steipete/tap | ||
| brew install steipete/tap/sag | ||
| brew test steipete/tap/sag | ||
| sag --version | ||
| gh workflow run release-binaries.yml --repo steipete/sag -f tag=vX.Y.Z | ||
| ``` | ||
|
|
||
| ## Notes | ||
| - Formula builds from source; no binary assets required. | ||
| - Keep formula minimal: version, url, sha256, license, `go` build dep, `std_go_args`. | ||
| The workflow redispatches `update-formula.yml` with the repository, tag, artifact template, and a unique request ID, then waits for the matching tap run. Verify the rerun and formula before installing. Manual formula edits are a last-resort repair and still require checksums from the exact published assets. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When cutting a new tag without pre-creating the GitHub release, this checklist now relies on the workflow-created release but never tells the maintainer how the required title/body get populated. I checked
.github/workflows/release-binaries.ymland the upload step only passestag_nameandfilestosoftprops/action-gh-release(noname,body, or generated-notes option), so the very next verification can fail unless someone knows to edit the release out-of-band. Please either add an explicit create/edit step here or wire the workflow to set the release metadata.Useful? React with 👍 / 👎.