diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 513eb28456f..93e1f8b2d57 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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 }} @@ -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: diff --git a/CMakeLists.txt b/CMakeLists.txt index d672c9b8ae8..593d86b82dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.18) # todo - set version to 0.0.0 once confident in automated versioning project(Sunshine VERSION 0.22.0 - DESCRIPTION "Sunshine is a self-hosted game stream host for Moonlight." + DESCRIPTION "Self-hosted game stream host for Moonlight" HOMEPAGE_URL "https://app.lizardbyte.dev/Sunshine") set(PROJECT_LICENSE "GPL-3.0") diff --git a/packaging/macos/sunshine.rb b/packaging/macos/sunshine.rb index c0fee570aaf..e312c99d4d6 100644 --- a/packaging/macos/sunshine.rb +++ b/packaging/macos/sunshine.rb @@ -7,7 +7,7 @@ class @PROJECT_NAME@ < Formula tag: "@GITHUB_BRANCH@" version "@PROJECT_VERSION@" license all_of: ["GPL-3.0-only"] - head "@GITHUB_CLONE_URL@" + head "@GITHUB_CLONE_URL@", branch: "nightly" depends_on "boost" => :build depends_on "cmake" => :build @@ -38,14 +38,6 @@ def install run [opt_bin/"sunshine", "~/.config/sunshine/sunshine.conf"] end - test do - # test that the binary runs at all - output = shell_output("#{bin}/sunshine --version").strip - puts output - - # todo: add unit tests - end - def caveats <<~EOS Thanks for installing @PROJECT_NAME@! @@ -59,4 +51,12 @@ def caveats Gamepads are not currently supported on macOS. EOS end + + test do + # test that the binary runs at all + output = shell_output("#{bin}/sunshine --version").strip + puts output + + # TODO: add unit tests + end end