Skip to content

Commit

Permalink
test new homebrew release action
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Mar 9, 2024
1 parent 659e0d7 commit 986a0c8
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -691,21 +691,11 @@ jobs:
cd ..
# copy formula to artifacts
mkdir -p homebrew/Formula
cp -f ./build/sunshine.rb ./homebrew/Formula/sunshine.rb
mkdir -p homebrew
cp -f ./build/sunshine.rb ./homebrew/sunshine.rb
# testing
cat ./homebrew/Formula/sunshine.rb
- name: Install formula
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
run: |
brew install --verbose ./build/sunshine.rb
- name: Test formula
run: |
brew test sunshine
cat ./homebrew/sunshine.rb
- name: Upload Artifacts
if: ${{ matrix.release }}
Expand All @@ -714,16 +704,28 @@ jobs:
name: sunshine-homebrew
path: homebrew/

- name: Publish Homebrew Formula
if: |
(github.repository_owner == 'LizardByte' &&
needs.setup_release.outputs.create_release == 'true' &&
github.ref == 'refs/heads/master' &&
matrix.release)
uses: LizardByte/homebrew-release-action@v2024.307.223116
- name: Should Publish Homebrew Formula
id: homebrew_publish
run: |
PUBLISH=false
if [[ \
"${{ matrix.release }}" == "true" && \
"${{ github.repository_owner }}" == "LizardByte" && \
"${{ needs.setup_release.outputs.create_release }}" == "true" && \
"${{ github.ref }}" == "refs/heads/master" \
]]; then
PUBLISH=true
fi
echo "publish=${PUBLISH}" >> $GITHUB_OUTPUT
- name: Validate and Publish Homebrew Formula
uses: LizardByte/homebrew-release-action@fix-checkout-paths-must-be-under-github-workspace
with:
formula_file: ${{ github.workspace }}/homebrew/sunshine.rb
git_email: ${{ secrets.GH_BOT_EMAIL }}
git_username: ${{ secrets.GH_BOT_NAME }}
publish: ${{ steps.homebrew_publish.outputs.publish }}
token: ${{ secrets.GH_BOT_TOKEN }}

build_mac_port:
Expand Down

0 comments on commit 986a0c8

Please sign in to comment.