feat: add 'set up homebrew' step publish.yaml
This commit is contained in:
parent
808daa44e1
commit
8b38314913
7
.github/workflows/publish.yaml
vendored
7
.github/workflows/publish.yaml
vendored
@ -42,6 +42,13 @@ jobs:
|
|||||||
needs: npm
|
needs: npm
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
|
# Ensure things are up to date
|
||||||
|
# Suggested by homebrew maintainers
|
||||||
|
# https://github.com/Homebrew/discussions/discussions/1532#discussioncomment-782633
|
||||||
|
- name: Set up Homebrew
|
||||||
|
id: set-up-homebrew
|
||||||
|
uses: Homebrew/actions/setup-homebrew@master
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Configure git
|
- name: Configure git
|
||||||
run: |
|
run: |
|
||||||
|
@ -29,7 +29,11 @@ main() {
|
|||||||
# Source: https://serverfault.com/a/912788
|
# Source: https://serverfault.com/a/912788
|
||||||
# shellcheck disable=SC2016,SC2028
|
# shellcheck disable=SC2016,SC2028
|
||||||
echo '#!/bin/sh\nexec echo "$HOMEBREW_GITHUB_API_TOKEN"' >"$HOME"/.git-askpass.sh
|
echo '#!/bin/sh\nexec echo "$HOMEBREW_GITHUB_API_TOKEN"' >"$HOME"/.git-askpass.sh
|
||||||
GIT_ASKPASS="$HOME/.git-askpass.sh" git push https://cdrci@github.com/cdrci/homebrew-core.git --all
|
# Ensure it's executable since we just created it
|
||||||
|
chmod +x "$HOME/.git-askpass.sh"
|
||||||
|
# GIT_ASKPASS lets us use the password when pushing without revealing it in the process list
|
||||||
|
# See: https://serverfault.com/a/912788
|
||||||
|
GIT_ASKPASS="$HOME/.git-askpass.sh" git push https://cdr-oss@github.com/cdr-oss/homebrew-core.git --all
|
||||||
|
|
||||||
# Find the docs for bump-formula-pr here
|
# Find the docs for bump-formula-pr here
|
||||||
# https://github.com/Homebrew/brew/blob/master/Library/Homebrew/dev-cmd/bump-formula-pr.rb#L18
|
# https://github.com/Homebrew/brew/blob/master/Library/Homebrew/dev-cmd/bump-formula-pr.rb#L18
|
||||||
|
Reference in New Issue
Block a user