@@ -395,12 +395,17 @@ jobs:
395395 if : env.HOMEBREW_TAP_TOKEN != ''
396396 run : |
397397 VERSION="${{ needs.release.outputs.version }}"
398+ FORMULA_BASE_URL="https://github.com/cameroncooke/XcodeBuildMCP/releases/download/v${VERSION}"
399+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
400+ FORMULA_BASE_URL="https://raw.githubusercontent.com/cameroncooke/homebrew-xcodebuildmcp/main/artifacts/${VERSION}"
401+ fi
398402 ARM64_SHA="$(awk '{print $1}' dist/portable/arm64/xcodebuildmcp-${VERSION}-darwin-arm64.tar.gz.sha256)"
399403 X64_SHA="$(awk '{print $1}' dist/portable/x64/xcodebuildmcp-${VERSION}-darwin-x64.tar.gz.sha256)"
400404 npm run homebrew:formula -- \
401405 --version "$VERSION" \
402406 --arm64-sha "$ARM64_SHA" \
403407 --x64-sha "$X64_SHA" \
408+ --base-url "$FORMULA_BASE_URL" \
404409 --out dist/homebrew/Formula/xcodebuildmcp.rb
405410
406411 - name : Create pull request in tap repo
@@ -411,8 +416,19 @@ jobs:
411416 VERSION="${{ needs.release.outputs.version }}"
412417 BRANCH="xcodebuildmcp-v${VERSION}"
413418 DEFAULT_BRANCH="main"
419+ ADD_TAP_ARTIFACTS="false"
420+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
421+ ADD_TAP_ARTIFACTS="true"
422+ fi
414423 git clone "https://x-access-token:${GH_TOKEN}@github.com/cameroncooke/homebrew-xcodebuildmcp.git" tap-repo
415424 mkdir -p tap-repo/Formula
425+ if [ "$ADD_TAP_ARTIFACTS" = "true" ]; then
426+ mkdir -p "tap-repo/artifacts/${VERSION}"
427+ cp "dist/portable/arm64/xcodebuildmcp-${VERSION}-darwin-arm64.tar.gz" "tap-repo/artifacts/${VERSION}/"
428+ cp "dist/portable/arm64/xcodebuildmcp-${VERSION}-darwin-arm64.tar.gz.sha256" "tap-repo/artifacts/${VERSION}/"
429+ cp "dist/portable/x64/xcodebuildmcp-${VERSION}-darwin-x64.tar.gz" "tap-repo/artifacts/${VERSION}/"
430+ cp "dist/portable/x64/xcodebuildmcp-${VERSION}-darwin-x64.tar.gz.sha256" "tap-repo/artifacts/${VERSION}/"
431+ fi
416432 cp dist/homebrew/Formula/xcodebuildmcp.rb tap-repo/Formula/xcodebuildmcp.rb
417433 cd tap-repo
418434 git config user.name "github-actions[bot]"
@@ -421,6 +437,9 @@ jobs:
421437 echo "Tap repo has no commits; bootstrapping ${DEFAULT_BRANCH}."
422438 git checkout -b "$DEFAULT_BRANCH"
423439 git add Formula/xcodebuildmcp.rb
440+ if [ "$ADD_TAP_ARTIFACTS" = "true" ]; then
441+ git add "artifacts/${VERSION}"
442+ fi
424443 git commit -m "Initialize xcodebuildmcp formula ${VERSION}"
425444 git push origin "$DEFAULT_BRANCH"
426445 exit 0
@@ -435,6 +454,9 @@ jobs:
435454 fi
436455 git checkout -B "$BRANCH"
437456 git add Formula/xcodebuildmcp.rb
457+ if [ "$ADD_TAP_ARTIFACTS" = "true" ]; then
458+ git add "artifacts/${VERSION}"
459+ fi
438460 git commit -m "xcodebuildmcp ${VERSION}"
439461 git push --set-upstream origin "$BRANCH"
440462 gh pr create \
0 commit comments