Browse Source

build: split publish into darwin/mas on Mac

Keeley Hammond 9 months ago
parent
commit
4381058c82

+ 34 - 2
.github/workflows/macos-publish.yml

@@ -40,7 +40,7 @@ jobs:
       with:
         generate-sas-token: 'true'
 
-  publish-x64:
+  publish-x64-darwin:
     uses: ./.github/workflows/pipeline-segment-electron-build.yml
     needs: checkout-macos
     with:
@@ -52,9 +52,40 @@ jobs:
       gn-build-type: release
       generate-symbols: true
       upload-to-storage: ${{ inputs.upload-to-storage }}
+      step-suffix: 'darwin'
     secrets: inherit
 
-  publish-arm64:
+  publish-x64-mas:
+    uses: ./.github/workflows/pipeline-segment-electron-build.yml
+    needs: checkout-macos
+    with:
+      environment: production-release
+      build-runs-on: macos-14-xlarge
+      target-platform: macos
+      target-arch: x64
+      is-release: true
+      gn-build-type: release
+      generate-symbols: true
+      upload-to-storage: ${{ inputs.upload-to-storage }}
+      step-suffix: 'mas'
+    secrets: inherit
+
+  publish-arm64-darwin:
+    uses: ./.github/workflows/pipeline-segment-electron-build.yml
+    needs: checkout-macos
+    with:
+      environment: production-release
+      build-runs-on: macos-14-xlarge
+      target-platform: macos
+      target-arch: arm64
+      is-release: true
+      gn-build-type: release
+      generate-symbols: true
+      upload-to-storage: ${{ inputs.upload-to-storage }}
+      step-suffix: 'darwin'
+    secrets: inherit
+
+  publish-arm64-mas:
     uses: ./.github/workflows/pipeline-segment-electron-build.yml
     needs: checkout-macos
     with:
@@ -66,4 +97,5 @@ jobs:
       gn-build-type: release
       generate-symbols: true
       upload-to-storage: ${{ inputs.upload-to-storage }}
+      step-suffix: 'mas'
     secrets: inherit

+ 7 - 1
.github/workflows/pipeline-segment-electron-build.yml

@@ -54,6 +54,11 @@ on:
         required: false
         type: boolean
         default: false
+      step-suffix: 
+        description: 'Darwin or MAS publish'
+        required: false
+        type: string
+        default: ''
 
 
 concurrency:
@@ -184,6 +189,7 @@ jobs:
       if: ${{ inputs.target-platform == 'macos' }}
       uses: ./src/electron/.github/actions/free-space-macos
     - name: Build Electron
+      if: ${{ inputs.target-platform != 'macos' && inputs.is_release != 'true' && inputs.step-suffix != 'mas' }}
       uses: ./src/electron/.github/actions/build-electron
       with:
         target-arch: ${{ inputs.target-arch }}
@@ -201,7 +207,7 @@ jobs:
         GN_EXTRA_ARGS='is_mas_build=true'
         echo "GN_EXTRA_ARGS=$GN_EXTRA_ARGS" >> $GITHUB_ENV
     - name: Build Electron (MAS)
-      if: ${{ inputs.target-platform == 'macos' }}
+      if: ${{ inputs.target-platform == 'macos' && inputs.is_release == 'true' && inputs.step-suffix == 'mas' }}
       uses: ./src/electron/.github/actions/build-electron
       with:
         target-arch: ${{ inputs.target-arch }}