- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 298
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
feat: re-add homebrew bump flow #151
Conversation
Signed-off-by: Rui Chen <rui@chenrui.dev>
Run & review this pull request in StackBlitz Codeflow. |
📝 WalkthroughWalkthroughA new GitHub Actions workflow file named Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GitHub
participant Homebrew
participant Git
User->>GitHub: Create Release
GitHub->>Homebrew: Trigger Workflow
Homebrew->>Homebrew: Set up Homebrew
Homebrew->>Git: Configure Git user
Homebrew->>Homebrew: Bump packages
Git->>Homebrew: Update formulae
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 2
🧹 Outside diff range and nitpick comments (2)
.github/workflows/release.yml (2)
3-6
: Consider filtering releases based on type.The workflow currently runs on all created releases. Consider filtering for specific release types (e.g., excluding pre-releases or drafts) if that aligns with your versioning strategy.
on: release: types: - - created + - published
1-24
: Consider enhancing workflow reliability and monitoring.While the basic workflow is functional, consider these improvements:
- Add status checks or notifications for failed bumps
- Implement retry logic for transient failures
- Add workflow artifacts to preserve logs
jobs: homebrew: runs-on: macos-latest + outputs: + bump-status: ${{ steps.bump.outputs.status }} steps: # ... existing steps ... - name: Bump packages + id: bump uses: Homebrew/actions/bump-packages@master with: token: ${{ secrets.COMMITTER_TOKEN }} formulae: repomix + - name: Upload logs + if: always() + uses: actions/upload-artifact@v3 + with: + name: homebrew-logs + path: ~/.homebrew/logs/ + + notify: + needs: homebrew + if: always() + runs-on: ubuntu-latest + steps: + - name: Notify status + uses: actions/github-script@v6 + with: + script: | + const status = context.needs.homebrew.outputs['bump-status'] + const message = `Homebrew bump ${status ? 'succeeded' : 'failed'}` + github.rest.issues.createComment({ + ...context.repo, + issue_number: context.issue.number, + body: message + })
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
.github/workflows/release.yml
(1 hunks)
🔇 Additional comments (1)
.github/workflows/release.yml (1)
23-24
: Verify COMMITTER_TOKEN permissions and consider parameterizing the formula name.
The workflow uses a sensitive token and a hardcoded formula name. Please ensure:
- The COMMITTER_TOKEN has minimal required permissions
- Consider making the formula name configurable through workflow inputs
@chenrui333 I've checked the source of actions, and this new approach is more robust and trustworthy. Ready to merge once CI passes! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #151 +/- ##
=======================================
Coverage 77.54% 77.54%
=======================================
Files 36 36
Lines 1759 1759
Branches 327 327
=======================================
Hits 1364 1364
Misses 395 395 ☔ View full report in Codecov by Sentry. |
@chenrui333 Feel free to open more PRs if you find anything else that could be enhanced! |
yeah, totally, thanks for the support! |
re-add homebrew bump flow per formula rename.
using official brew actions this time so that the npmjs artifact issue would be resolved see here and here