feat: add Homebrew tap support for automated formula publishing#1086
feat: add Homebrew tap support for automated formula publishing#1086looplj merged 1 commit intolooplj:release/v0.9.xfrom
Conversation
- Add Homebrew brews configuration to .goreleaser.yml - Configure automatic formula publishing to looplj/homebrew-axonhub - Add HOMEBREW_TAP_GITHUB_TOKEN to release workflow - Install binary to libexec with wrapper script in bin - Create config directory at /opt/homebrew/etc/axonhub - Support brew services for background service management - AxonHub runs with built-in defaults, no config file required
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces comprehensive support for automated Homebrew formula publishing for the Highlights
Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds Homebrew tap support for automated formula publishing, which is a great feature for distributing the application. The GoReleaser configuration for the Homebrew formula is well-structured. I've suggested a small improvement to the service block definition to make it more direct and idiomatic for Homebrew services. Overall, this is a solid implementation.
| run [opt_bin/"axonhub"] | ||
| keep_alive true |
There was a problem hiding this comment.
For brew services, it's cleaner and more efficient to run the binary directly from libexec and explicitly set the working_dir, rather than relying on the shell wrapper from bin. The wrapper is great for interactive use, but the service definition can be more direct. This avoids the overhead of a shell process and makes the service's execution context clearer.
run libexec/"axonhub"
working_dir etc/"axonhub"
keep_alive true|
这个可以合了吗,需要我配置什么吗 |
主要是要加个TOKEN |
@looplj 步骤一:创建个人访问令牌 或者使用经典令牌: 步骤二:添加到仓库密钥库中 |
Closes #1076
Summary
Add Homebrew tap support for automated formula publishing to
looplj/homebrew-axonhub.Changes
.goreleaser.yml: Addbrewsconfiguration for automatic formula publishing on release.github/workflows/release.yml: AddHOMEBREW_TAP_GITHUB_TOKENenv var to GoReleaser stepHomebrew Formula Features
libexec/, wrapper script inbin//opt/homebrew/etc/axonhub/brew servicesfor background service managementaxonhub versiontestInstallation (after merge)
Setup Required: Create HOMEBREW_TAP_GITHUB_TOKEN
GoReleaser needs a token with read/write permissions to
looplj/homebrew-axonhubrepository to push formula updates automatically.Step 1: Create Personal Access Token
HOMEBREW_TAP_GITHUB_TOKENloopljlooplj/homebrew-axonhubAlternatively, use a Classic token:
repo(Full control of private repositories)Step 2: Add to Repository Secrets
HOMEBREW_TAP_GITHUB_TOKENStep 3: Verify
After merging, create a new release tag (e.g.,
v0.9.18):HOMEBREW_TAP_GITHUB_TOKENto push formula tolooplj/homebrew-axonhubbrew install looplj/axonhub/axonhubNote: If
HOMEBREW_TAP_GITHUB_TOKENis not configured, GoReleaser falls back toGITHUB_TOKEN, which only has permissions to the current repository and cannot push tolooplj/homebrew-axonhub.Test Plan
brew tap+brew install axonhubverifiedaxonhub versionruns correctlyRelated PR