Skip to content

feat: configure Homebrew tap publishing#4

Merged
maxkulish merged 1 commit intomasterfrom
feat/homebrew-tap
Feb 23, 2026
Merged

feat: configure Homebrew tap publishing#4
maxkulish merged 1 commit intomasterfrom
feat/homebrew-tap

Conversation

@maxkulish
Copy link
Owner

Summary

  • Configure release.yml to publish formulae to maxkulish/homebrew-tap (user-level multi-package tap)
  • Fork-safe: uses github.repository instead of hardcoded rtk-ai/rtk for checksums and download URLs
  • Cross-repo auth: explicit GH_TOKEN with HOMEBREW_TAP_TOKEN secret
  • Cross-platform base64 encoding (GNU + BSD safe)
  • Formula validation (ruby -c) before pushing to tap
  • Failure alert: auto-creates GitHub issue if homebrew push fails (e.g., expired token)
  • Add issues:write permission to both release.yml and release-please.yml

Test plan

  • Enable GitHub Actions on the fork (first-time setup)
  • Trigger: gh workflow run release.yml --repo maxkulish/rtk -f tag=v0.23.2
  • Verify formula pushed to maxkulish/homebrew-tap/Formula/rtk.rb
  • Verify: brew tap maxkulish/tap && brew install rtk && rtk --version

- Update release.yml: fork-safe github.repository refs, cross-repo auth,
  cross-platform base64, ruby formula validation, failure alert step
- Add issues:write permission for failure alert GitHub issue creation
- Add Homebrew tap setup plan (docs/plans/06-homebrew-tap.md)
@gemini-code-assist
Copy link

Summary of Changes

Hello @maxkulish, 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 establishes a robust and automated pipeline for publishing Homebrew formulae to a dedicated user-level tap. The changes ensure that the release workflow is fork-safe, handles cross-repository authentication securely, and includes critical validation and alerting mechanisms to maintain the integrity and reliability of the Homebrew distribution process. This significantly streamlines the release of rtk and prepares the system for future package additions.

Highlights

  • Homebrew Tap Publishing: Configured the release.yml workflow to automatically publish Homebrew formulae to a user-level multi-package tap (maxkulish/homebrew-tap), enabling streamlined distribution for rtk and future tools.
  • Fork-Safe Configuration: Updated the workflow to use ${{ github.repository }} for checksum and download URLs, ensuring the release process functions correctly in both the main repository and forks.
  • Cross-Repository Authentication: Implemented explicit GH_TOKEN usage with a HOMEBREW_TAP_TOKEN secret for cross-repository authentication, allowing the workflow to push formula files to the separate Homebrew tap repository.
  • Cross-Platform Compatibility: Modified the base64 encoding command to cat rtk.rb | base64 | tr -d '\n', ensuring cross-platform compatibility across different operating systems (GNU and BSD safe).
  • Formula Validation: Added a ruby -c rtk.rb step to validate the generated Homebrew formula's Ruby syntax before pushing it to the tap, preventing syntax errors from reaching users.
  • Failure Alerting: Introduced a new step to automatically create a GitHub issue if the Homebrew push fails (e.g., due to an expired token), providing proactive notification of issues.
  • Permissions Update: Added issues:write permission to both release.yml and release-please.yml to support the new failure alerting mechanism.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • docs/plans/06-homebrew-tap.md
    • Added a comprehensive plan document outlining the setup, configuration, and best practices for establishing a user-level Homebrew tap, including detailed steps for PAT creation, secret management, workflow updates, and addressing potential blind spots.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/release-please.yml
    • .github/workflows/release.yml
Activity
  • A new documentation file docs/plans/06-homebrew-tap.md was added, detailing the entire process of configuring Homebrew tap publishing.
  • The documentation outlines several steps for setting up the Homebrew tap, including creating the tap repository, generating a GitHub Personal Access Token (PAT), and adding it as a secret.
  • The plan details specific modifications to the release.yml workflow, covering changes to checksum downloads, formula URLs, push targets, authentication, base64 encoding, formula validation, and failure notifications.
  • The PR description indicates that several steps in the release.yml update are already completed, while PAT creation, secret setup, and end-to-end testing are pending manual actions or are blocked.
  • The documentation also addresses potential issues such as cross-repo authentication, cross-platform base64 incompatibility, missing formula validation, token expiration, and macOS Gatekeeper concerns, providing solutions for each.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request introduces a new documentation file for configuring Homebrew tap publishing. The document is well-structured and covers all necessary steps, including repository creation, PAT generation, release.yml updates, and testing. It also addresses several potential blind spots, which is excellent for proactive problem-solving. The changes are primarily documentation-focused, detailing the setup for a new CI/CD process. The release.yml updates mentioned in the document are critical for the functionality described, ensuring fork-safety, cross-repo authentication, cross-platform compatibility, and formula validation. The addition of failure alerts is a good practice for maintainability. Overall, the changes are well-thought-out and clearly explained.

@maxkulish maxkulish merged commit 9402724 into master Feb 23, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant