Skip to content

Commit cb4055d

Browse files
committed
fix(ci): extract version from tag for Homebrew formula update
The mislav/bump-homebrew-formula-action compares formula version against the tag-name to determine if an update is needed. With our tag format 'redisctl-v0.7.3', the action was comparing '0.7.2' (from formula) against 'redisctl-v0.7.3' and incorrectly determining that 0.7.2 is newer. This fix extracts just the version number (e.g., '0.7.3') from the full tag name and passes 'v0.7.3' to the action for proper comparison, while keeping the original tag for the download URL.
1 parent 88e96fd commit cb4055d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,12 +289,18 @@ jobs:
289289
if: ${{ always() && needs.host.result == 'success' && startsWith(needs.plan.outputs.tag, 'redisctl-v') }}
290290
runs-on: "ubuntu-22.04"
291291
steps:
292+
- name: Extract version from tag
293+
id: version
294+
run: |
295+
TAG="${{ needs.plan.outputs.tag }}"
296+
VERSION="${TAG#redisctl-v}"
297+
echo "version=$VERSION" >> $GITHUB_OUTPUT
292298
- uses: mislav/[email protected]
293299
with:
294300
formula-name: redisctl
295301
formula-path: Formula/redisctl.rb
296302
base-branch: main
297-
tag-name: ${{ needs.plan.outputs.tag }}
303+
tag-name: v${{ steps.version.outputs.version }}
298304
homebrew-tap: redis-developer/homebrew-tap
299305
download-url: "https://github.com/redis-developer/redisctl/releases/download/${{ needs.plan.outputs.tag }}/redisctl-x86_64-apple-darwin.tar.xz"
300306
env:

0 commit comments

Comments
 (0)