From d6a4a2455dc6fa0ca1676c170208b42bd5551653 Mon Sep 17 00:00:00 2001 From: Mike Miller Date: Wed, 6 Sep 2023 17:53:59 +0300 Subject: [PATCH] Separate Rift and Quest upload --- .github/workflows/build.yml | 51 ++++++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 090da31327..158bc37fcf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -737,8 +737,8 @@ jobs: CHANNEL: android-quest-${{ env.ITCH_SUBCHANNEL_NAME }} PACKAGE: releases/OpenBrush_Quest_${{ needs.configuration.outputs.version }}.apk - publish_oculus: - name: Publish Oculus Release + publish_oculus_quest: + name: Publish Oculus Quest Release needs: [configuration, build] runs-on: macos-latest # the ovr-platform-util tool is only available for Mac and Windows if: | @@ -747,11 +747,6 @@ jobs: (github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags/v')) steps: - - name: Download Build Artifacts (Windows Rift) - uses: actions/download-artifact@v3 - with: - name: Windows Rift - path: build_windows_rift - name: Download Build Artifacts (Oculus Quest) uses: actions/download-artifact@v3 with: @@ -762,27 +757,59 @@ jobs: VERSION: ${{ needs.configuration.outputs.version }} PRERELEASE: ${{ needs.configuration.outputs.prerelease }} RAW_CHANGELOG: ${{ needs.configuration.outputs.rawchangelog }} - OCULUS_RIFT_APP_ID: ${{ secrets.OCULUS_RIFT_APP_ID }} - OCULUS_RIFT_APP_SECRET: ${{ secrets.OCULUS_RIFT_APP_SECRET }} OCULUS_QUEST_APP_ID: ${{ secrets.OCULUS_QUEST_APP_ID }} OCULUS_QUEST_APP_SECRET: ${{ secrets.OCULUS_QUEST_APP_SECRET }} run: | mkdir releases mv build_oculus_quest/*/com.Icosa.OpenBrush*apk releases/OpenBrush_Quest_$VERSION.apk mv build_oculus_quest/*/com.Icosa.OpenBrush*.symbols.zip releases/symbols.zip - mv build_windows_rift/StandaloneWindows64-Oculus/ releases/OpenBrush_Rift_$VERSION/ cd releases unzip symbols.zip - zip -r OpenBrush_Rift_$VERSION.zip OpenBrush_Rift_$VERSION/ curl -L 'https://www.oculus.com/download_app/?id=1462426033810370' -o ovr-platform-util chmod 755 ovr-platform-util if [ "$PRERELEASE" == "false" ] then ./ovr-platform-util upload-quest-build --app-id ${OCULUS_QUEST_APP_ID} --app-secret ${OCULUS_QUEST_APP_SECRET} --apk OpenBrush_Quest_$VERSION.apk --channel LIVE --debug_symbols_dir ./arm64-v8a/ --debug-symbols-pattern '*.so' - ./ovr-platform-util upload-rift-build --app-id ${OCULUS_RIFT_APP_ID} --app-secret ${OCULUS_RIFT_APP_SECRET} --build-dir OpenBrush_Rift_$VERSION --launch-file OpenBrush.exe --channel LIVE --version $VERSION --firewall_exceptions true --redistributables 822786567843179,1675031999409058,2657209094360789 else CHANGELOG="${RAW_CHANGELOG}" ./ovr-platform-util upload-quest-build --app-id ${OCULUS_QUEST_APP_ID} --app-secret ${OCULUS_QUEST_APP_SECRET} --apk OpenBrush_Quest_$VERSION.apk --channel Beta --debug_symbols_dir ./arm64-v8a/ --debug-symbols-pattern '*.so' --notes "${CHANGELOG}" + fi + + publish_oculus_rift: + name: Publish Oculus Rift Release + needs: [configuration, build] + runs-on: macos-latest # the ovr-platform-util tool is only available for Mac and Windows + if: | + github.event_name == 'push' && + github.repository == 'icosa-foundation/open-brush' && + (github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags/v')) + + steps: + - name: Download Build Artifacts (Windows Rift) + uses: actions/download-artifact@v3 + with: + name: Windows Rift + path: build_windows_rift + - name: Publish Oculus Builds + env: + VERSION: ${{ needs.configuration.outputs.version }} + PRERELEASE: ${{ needs.configuration.outputs.prerelease }} + RAW_CHANGELOG: ${{ needs.configuration.outputs.rawchangelog }} + OCULUS_RIFT_APP_ID: ${{ secrets.OCULUS_RIFT_APP_ID }} + OCULUS_RIFT_APP_SECRET: ${{ secrets.OCULUS_RIFT_APP_SECRET }} + run: | + mkdir releases + mv build_windows_rift/StandaloneWindows64-Oculus/ releases/OpenBrush_Rift_$VERSION/ + cd releases + zip -r OpenBrush_Rift_$VERSION.zip OpenBrush_Rift_$VERSION/ + curl -L 'https://www.oculus.com/download_app/?id=1462426033810370' -o ovr-platform-util + chmod 755 ovr-platform-util + + if [ "$PRERELEASE" == "false" ] + then + ./ovr-platform-util upload-rift-build --app-id ${OCULUS_RIFT_APP_ID} --app-secret ${OCULUS_RIFT_APP_SECRET} --build-dir OpenBrush_Rift_$VERSION --launch-file OpenBrush.exe --channel LIVE --version $VERSION --firewall_exceptions true --redistributables 822786567843179,1675031999409058,2657209094360789 + else + CHANGELOG="${RAW_CHANGELOG}" ./ovr-platform-util upload-rift-build --app-id ${OCULUS_RIFT_APP_ID} --app-secret ${OCULUS_RIFT_APP_SECRET} --build-dir OpenBrush_Rift_$VERSION --launch-file OpenBrush.exe --channel BETA --version $VERSION --firewall_exceptions true --redistributables 822786567843179,1675031999409058,2657209094360789 --notes "${CHANGELOG}" fi