Skip to content

Commit acb992a

Browse files
committed
feat: add 'set up homebrew' step publish.yaml
1 parent e756a2f commit acb992a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.github/workflows/publish.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ jobs:
4242
needs: npm
4343
runs-on: macos-latest
4444
steps:
45+
# Ensure things are up to date
46+
# Suggested by homebrew maintainers
47+
# https://github.com/Homebrew/discussions/discussions/1532#discussioncomment-782633
48+
- name: Set up Homebrew
49+
id: set-up-homebrew
50+
uses: Homebrew/actions/setup-homebrew@master
51+
4552
- uses: actions/checkout@v2
4653
- name: Configure git
4754
run: |

ci/steps/brew-bump.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ main() {
2929
# Source: https://serverfault.com/a/912788
3030
# shellcheck disable=SC2016,SC2028
3131
echo '#!/bin/sh\nexec echo "$HOMEBREW_GITHUB_API_TOKEN"' >"$HOME"/.git-askpass.sh
32+
# Ensure it's executable since we just created it
33+
chmod +x "$HOME/.git-askpass.sh"
34+
# GIT_ASKPASS lets us use the password when pushing without revealing it in the process list
35+
# See: https://serverfault.com/a/912788
3236
GIT_ASKPASS="$HOME/.git-askpass.sh" git push https://cdrci@github.com/cdrci/homebrew-core.git --all
3337

3438
# Find the docs for bump-formula-pr here

0 commit comments

Comments
 (0)