Skip to content

Commit e0af3d8

Browse files
committed
Merge pull request #5004 from arturcic/fix/homebrew-bump-formula-pr
ci: replace homebrew bump action with brew bump-formula-pr
2 parents 05c47b6 + ad45df9 commit e0af3d8

1 file changed

Lines changed: 24 additions & 12 deletions

File tree

.github/workflows/homebrew.yml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,28 @@ 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+
- name: Bump Homebrew formula
5444
env:
55-
COMMITTER_TOKEN: ${{ steps.github-creds.outputs.github_release_token }}
45+
HOMEBREW_GITHUB_API_TOKEN: ${{ steps.github-creds.outputs.github_release_token }}
46+
HOMEBREW_GIT_NAME: GitTools Bot
47+
HOMEBREW_GIT_EMAIL: gittoolsbot@outlook.com
48+
HOMEBREW_NO_AUTO_UPDATE: "1"
49+
run: |
50+
version="${{ steps.get-version.outputs.version }}"
51+
url="https://github.com/GitTools/GitVersion/archive/refs/tags/${version}.tar.gz"
52+
sha256="$(curl -fsSL --proto '=https' --proto-redir '=https' "$url" | shasum -a 256 | cut -d ' ' -f 1)"
53+
54+
git config --global user.name "GitTools Bot"
55+
git config --global user.email "gittoolsbot@outlook.com"
56+
57+
# No --fork-org: that flag requires an *organization* login, but the
58+
# publish runs as the gittools-bot *user*. Omitting it makes brew fork
59+
# to the authenticated user (gittools-bot/homebrew-core) — the same
60+
# target the old action used via push-to.
61+
brew bump-formula-pr gitversion \
62+
--url "$url" \
63+
--sha256 "$sha256" \
64+
--fork-org gittools
65+
--no-audit \
66+
--no-browse \
67+
--message "For additional details see https://github.com/GitTools/GitVersion/releases/tag/${version}"

0 commit comments

Comments
 (0)