@@ -40,16 +40,31 @@ jobs:
4040 with :
4141 op_service_account_token : ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
4242
43- - uses : mislav/bump-homebrew-formula-action@ccf2332299a883f6af50a1d2d41e5df7904dd769 # v4.1
44- name : Bump Homebrew formula
45- with :
46- formula-name : gitversion
47- tag-name : ${{ steps.get-version.outputs.version }}
48- download-url : https://github.com/GitTools/GitVersion/archive/refs/tags/${{ steps.get-version.outputs.version }}.tar.gz
49- push-to : gittools-bot/homebrew-core
50- commit-message : |
51- {{formulaName}} {{version}}
52-
53- For additional details see https://github.com/GitTools/GitVersion/releases/tag/${{ steps.get-version.outputs.version }}
43+ # Uses Homebrew's own `brew bump-formula-pr` (preinstalled on the runner) rather than a
44+ # third-party action. mislav/bump-homebrew-formula-action breaks when GitHub's tarball
45+ # endpoint returns HTTP 303 instead of 302 (see mislav/bump-homebrew-formula-action#342);
46+ # the official CLI handles the redirect correctly and removes a pinned-action dependency.
47+ - name : Bump Homebrew formula
5448 env :
55- COMMITTER_TOKEN : ${{ steps.github-creds.outputs.github_release_token }}
49+ HOMEBREW_GITHUB_API_TOKEN : ${{ steps.github-creds.outputs.github_release_token }}
50+ HOMEBREW_GIT_NAME : GitTools Bot
51+ HOMEBREW_GIT_EMAIL : gittoolsbot@outlook.com
52+ HOMEBREW_NO_AUTO_UPDATE : " 1"
53+ run : |
54+ version="${{ steps.get-version.outputs.version }}"
55+ url="https://github.com/GitTools/GitVersion/archive/refs/tags/${version}.tar.gz"
56+ sha256="$(curl -fsSL --proto '=https' --proto-redir '=https' "$url" | shasum -a 256 | cut -d ' ' -f 1)"
57+
58+ git config --global user.name "GitTools Bot"
59+ git config --global user.email "gittoolsbot@outlook.com"
60+
61+ # No --fork-org: that flag requires an *organization* login, but the
62+ # publish runs as the gittools-bot *user*. Omitting it makes brew fork
63+ # to the authenticated user (gittools-bot/homebrew-core) — the same
64+ # target the old action used via push-to.
65+ brew bump-formula-pr gitversion \
66+ --url "$url" \
67+ --sha256 "$sha256" \
68+ --no-audit \
69+ --no-browse \
70+ --message "For additional details see https://github.com/GitTools/GitVersion/releases/tag/${version}"
0 commit comments