Skip to content

Commit b4e80c4

Browse files
fix(ci): restore Homebrew formula auto-update (#502)
The update-homebrew job was removed when cargo-dist regenerated release.yml. This restores automatic formula updates on release. - Uses mislav/bump-homebrew-formula-action@v3.2 - Updated tap to redis-developer/homebrew-tap - Added note about manual maintenance since cargo-dist overwrites this file
1 parent 6e44176 commit b4e80c4

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

.github/workflows/release.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ on:
4242
pull_request:
4343
push:
4444
tags:
45-
- '**[0-9]+.[0-9]+.[0-9]+*'
45+
- "**[0-9]+.[0-9]+.[0-9]+*"
4646

4747
jobs:
4848
# Run 'dist plan' (or host) to determine what tasks we need to do
@@ -278,6 +278,36 @@ jobs:
278278
279279
gh release create "${{ needs.plan.outputs.tag }}" --target "$RELEASE_COMMIT" $PRERELEASE_FLAG --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" artifacts/*
280280
281+
# Update Homebrew formula after successful release
282+
# NOTE: This job is manually maintained - cargo-dist regenerates release.yml
283+
# and will remove this job. Re-add it after running `dist generate` or `dist init`.
284+
update-homebrew:
285+
needs:
286+
- plan
287+
- host
288+
if: ${{ always() && needs.host.result == 'success' }}
289+
runs-on: "ubuntu-22.04"
290+
steps:
291+
- name: Extract version from tag
292+
id: extract_version
293+
run: |
294+
TAG="${{ needs.plan.outputs.tag }}"
295+
# Remove 'redisctl-v' prefix to get version (e.g., redisctl-v0.7.1 -> 0.7.1)
296+
VERSION="${TAG#redisctl-v}"
297+
# Add 'v' prefix for Homebrew (e.g., 0.7.1 -> v0.7.1)
298+
echo "version=v${VERSION}" >> $GITHUB_OUTPUT
299+
echo "Extracted version: v${VERSION}"
300+
301+
- uses: mislav/bump-homebrew-formula-action@v3.2
302+
with:
303+
formula-name: redisctl
304+
formula-path: Formula/redisctl.rb
305+
base-branch: main
306+
tag-name: ${{ steps.extract_version.outputs.version }}
307+
homebrew-tap: redis-developer/homebrew-tap
308+
env:
309+
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
310+
281311
announce:
282312
needs:
283313
- plan

0 commit comments

Comments
 (0)