Skip to content

Commit

Permalink
workflows/build-pkg: actually try to install package.
Browse files Browse the repository at this point in the history
- This should help avoid this regressing
- Remove existing Homebrew installation(s)
- Install it twice to ensure that installing over the top of an existing
  installation works as expected
- Remove existing API cache to ensure we have the freshest files from
  the API in our package
  • Loading branch information
MikeMcQuaid committed Jul 27, 2023
1 parent 3db1acf commit e9ac1b8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build-pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
HOMEBREW_NO_ANALYTICS_THIS_RUN: 1
HOMEBREW_NO_ANALYTICS_MESSAGE_OUTPUT: 1
steps:
- name: Remove existing API cache (to force update)
run: rm -rf ~/Library/Caches/Homebrew/api

- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
Expand Down Expand Up @@ -119,6 +122,15 @@ jobs:
security delete-keychain "${RUNNER_TEMP}/${TEMPORARY_KEYCHAIN_FILE}"
fi
- name: Remove existing Homebrew installations
run: sudo rm -rf brew /usr/local/bin/brew /usr/local/.??* /usr/local/Homebrew /usr/local/Caskroom /usr/local/Cellar

- name: Install Homebrew from installer package
run: sudo installer -verbose -pkg Homebrew-${{ steps.print-version.outputs.version }}.pkg -target /

- name: Install Homebrew (again) from installer package
run: sudo installer -verbose -pkg Homebrew-${{ steps.print-version.outputs.version }}.pkg -target /

- name: Upload installer to GitHub Actions
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit e9ac1b8

Please sign in to comment.