Browse Source

github: disable App Store submission for beta builds

osy 2 years ago
parent
commit
1872260469
1 changed files with 6 additions and 2 deletions
  1. 6 2
      .github/workflows/build.yml

+ 6 - 2
.github/workflows/build.yml

@@ -25,6 +25,7 @@ on:
 env:
 env:
   BUILD_XCODE_PATH: /Applications/Xcode_15.0.app
   BUILD_XCODE_PATH: /Applications/Xcode_15.0.app
   RUNNER_IMAGE: macos-13
   RUNNER_IMAGE: macos-13
+  XCODE_BETA: 'true'
 
 
 jobs:
 jobs:
   configuration:
   configuration:
@@ -33,6 +34,7 @@ jobs:
     outputs:
     outputs:
       runner: ${{ steps.checker.outputs.runners }}
       runner: ${{ steps.checker.outputs.runners }}
       github-runner: ${{ steps.checker.outputs.github-runner }}
       github-runner: ${{ steps.checker.outputs.github-runner }}
+      xcode-beta: ${{ steps.checker.outputs.xcode-beta }}
     steps:
     steps:
     - name: Check for hosted runners
     - name: Check for hosted runners
       id: checker
       id: checker
@@ -41,6 +43,7 @@ jobs:
         IS_SELF_HOSTED_RUNNER: ${{ secrets.IS_SELF_HOSTED_RUNNER || (github.repository_owner == 'utmapp' && 'true') }}
         IS_SELF_HOSTED_RUNNER: ${{ secrets.IS_SELF_HOSTED_RUNNER || (github.repository_owner == 'utmapp' && 'true') }}
       run: |
       run: |
         echo "github-runner='$RUNNER_IMAGE'" >> $GITHUB_OUTPUT
         echo "github-runner='$RUNNER_IMAGE'" >> $GITHUB_OUTPUT
+        echo "xcode-beta='$XCODE_BETA'" >> $GITHUB_OUTPUT
         if [ "$IS_SELF_HOSTED_RUNNER" == "true" ]; then
         if [ "$IS_SELF_HOSTED_RUNNER" == "true" ]; then
           echo "runners=['self-hosted', 'macOS']" >> $GITHUB_OUTPUT
           echo "runners=['self-hosted', 'macOS']" >> $GITHUB_OUTPUT
         else
         else
@@ -334,12 +337,13 @@ jobs:
           HELPER_PROFILE_UUID: ${{ secrets.HELPER_PROFILE_UUID }}
           HELPER_PROFILE_UUID: ${{ secrets.HELPER_PROFILE_UUID }}
           LAUNCHER_PROFILE_UUID: ${{ secrets.LAUNCHER_PROFILE_UUID }}
           LAUNCHER_PROFILE_UUID: ${{ secrets.LAUNCHER_PROFILE_UUID }}
       - name: Notarize app
       - name: Notarize app
+        if: needs.configuration.outputs.xcode-beta != 'true'
         run: npx notarize-cli --file "UTM.dmg" --bundle-id "com.utmapp.UTM"
         run: npx notarize-cli --file "UTM.dmg" --bundle-id "com.utmapp.UTM"
         env:
         env:
           NOTARIZE_USERNAME: ${{ secrets.SIGNING_USERNAME }}
           NOTARIZE_USERNAME: ${{ secrets.SIGNING_USERNAME }}
           NOTARIZE_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
           NOTARIZE_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
       - name: Upload Artifact
       - name: Upload Artifact
-        if: github.event_name != 'release'
+        if: ${{ github.event_name != 'release' }}
         uses: actions/upload-artifact@v3
         uses: actions/upload-artifact@v3
         with:
         with:
           name: UTM-dmg
           name: UTM-dmg
@@ -358,7 +362,7 @@ jobs:
     name: Submit (macOS)
     name: Submit (macOS)
     runs-on: ${{ fromJSON(needs.configuration.outputs.github-runner) }}
     runs-on: ${{ fromJSON(needs.configuration.outputs.github-runner) }}
     needs: [configuration, build-universal]
     needs: [configuration, build-universal]
-    if: github.event_name == 'release' || github.event.inputs.test_release == 'true'
+    if: needs.configuration.outputs.xcode-beta != 'true' && (github.event_name == 'release' || github.event.inputs.test_release == 'true')
     steps:
     steps:
       - name: Checkout
       - name: Checkout
         uses: actions/checkout@v3
         uses: actions/checkout@v3