-
Notifications
You must be signed in to change notification settings - Fork 964
fix(ci): chain Homebrew formula bump into release-cli pipeline #4826
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
+38
−11
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,10 @@ | ||
| name: Release CLI | ||
|
|
||
| # Fires on cli-v* tag push. Builds the full 3-target matrix and publishes | ||
| # a draft GitHub Release plus a rolling cli-latest pointer. workflow_dispatch | ||
| # is the manual escape hatch for testing the full pipeline without cutting | ||
| # a tag (the release job is gated to tag pushes only). | ||
| # Fires on cli-v* tag push. Builds the full 3-target matrix, publishes a | ||
| # prerelease GitHub Release plus a rolling cli-latest pointer, then bumps the | ||
| # Homebrew formula. workflow_dispatch is the manual escape hatch for testing | ||
| # the full pipeline without cutting a tag (the release job is gated to tag | ||
| # pushes only). | ||
|
|
||
| on: | ||
| push: | ||
|
|
@@ -79,3 +80,16 @@ jobs: | |
| --notes "Rolling pointer to the latest published CLI release. See [${VERSION_TAG}](https://github.com/${{ github.repository }}/releases/tag/${VERSION_TAG}) for changelog." \ | ||
| --target "${{ github.sha }}" \ | ||
| --prerelease | ||
|
|
||
| bump-homebrew: | ||
| # Chained here instead of triggering on `release: published`: the release | ||
| # above is created with GITHUB_TOKEN, and GitHub does not fire workflow | ||
| # triggers for events generated by GITHUB_TOKEN, so an event-driven bump | ||
| # never runs. needs: release guarantees the tarballs are published first. | ||
| name: Bump Homebrew Formula | ||
| needs: release | ||
| if: startsWith(github.ref, 'refs/tags/cli-v') | ||
| uses: ./.github/workflows/bump-homebrew.yml | ||
| with: | ||
| tag: ${{ github.ref_name }} | ||
| secrets: inherit | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Narrow secret scope for the reusable workflow call. Line 95 inherits all available secrets into the called workflow. Pass only 🔐 Proposed least-privilege change# .github/workflows/release-cli.yml
bump-homebrew:
@@
- secrets: inherit
+ secrets:
+ HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}# .github/workflows/bump-homebrew.yml
on:
workflow_call:
inputs:
tag:
description: "CLI release tag (cli-v<semver>)"
required: true
type: string
+ secrets:
+ HOMEBREW_TAP_TOKEN:
+ required: true🤖 Prompt for AI Agents |
||
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.
Adjust the workflow_dispatch comment to match behavior.
Lines 5-7 say manual dispatch tests the “full pipeline,” but
releaseandbump-homebreware both gated torefs/tags/cli-v*, so dispatch currently runs build-only.🤖 Prompt for AI Agents