Browse Source

fix(build): nightly env (#6580)

Andelf 3 years ago
parent
commit
dc10bfd6cc
1 changed files with 5 additions and 3 deletions
  1. 5 3
      .github/workflows/build-desktop-release.yml

+ 5 - 3
.github/workflows/build-desktop-release.yml

@@ -122,9 +122,10 @@ jobs:
 
       - name: Set Build Environment Variables (only when workflow_dispath)
         if: ${{ github.event_name == 'workflow_dispatch' }}
+        # if scheduled, use default settings
         run: |
-          echo "ENABLE_PLUGINS=${{ github.event.inputs.enable-plugins }}" >> $GITHUB_ENV
-          echo "ENABLE_FILE_SYNC_PRODUCTION=${{ github.event.inputs.enable-file-sync-production }}" >> $GITHUB_ENV
+          echo "ENABLE_PLUGINS=${{ github.event_name == 'schedule' || github.event.inputs.enable-plugins == 'true' }}" >> $GITHUB_ENV
+          echo "ENABLE_FILE_SYNC_PRODUCTION=${{ github.event_name == 'schedule' || github.event.inputs.enable-file-sync-production == 'true' }}" >> $GITHUB_ENV
 
       - name: Compile CLJS
         run: yarn install && gulp build && yarn cljs:release-electron
@@ -426,7 +427,8 @@ jobs:
     if: ${{ github.event_name == 'schedule' || github.event.inputs.build-android == 'true' }}
     with:
       build-target: "${{ github.event.inputs.build-target }}"
-      enable-file-sync-production: "${{ github.event.inputs.enable-file-sync-production == 'true' }}"
+      # if scheduled, use production mode
+      enable-file-sync-production: "${{ github.event_name == 'schedule' || github.event.inputs.enable-file-sync-production == 'true' }}"
     secrets:
       ANDROID_KEYSTORE: "${{ secrets.ANDROID_KEYSTORE }}"
       ANDROID_KEYSTORE_PASSWORD: "${{ secrets.ANDROID_KEYSTORE_PASSWORD }}"