refactor(build): use env flags to control feature gate

This commit is contained in:
Andelf
2022-06-28 12:20:44 +08:00
parent e92af35954
commit fb92e64967
5 changed files with 30 additions and 3 deletions

View File

@@ -24,6 +24,16 @@ on:
type: boolean
required: true
default: true
enable-file-sync:
description: 'Build with file sync support'
type: boolean
required: true
default: false
enable-plugins:
description: 'Build with plugin system support'
type: boolean
required: true
default: true
schedule: # Every workday at the 2 P.M. (UTC) we run a scheduled nightly build
- cron: '0 14 * * MON-FRI'
@@ -87,6 +97,12 @@ jobs:
run: |
sed -i 's/defonce version ".*"/defonce version "${{ steps.ref.outputs.version }}"/g' src/main/frontend/version.cljs
- name: Set Build Environment Variables (only when workflow_dispath)
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo "ENABLE_FILE_SYNC=${{ github.event.inputs.enable-file-sync }}" >> $GITHUB_ENV
echo "ENABLE_PLUGINS=${{ github.event.inputs.enable-plugins }}" >> $GITHUB_ENV
- name: Compile CLJS
run: yarn install && gulp build && yarn cljs:release-electron