From 4d1e17b467c8854a4ecb58be7e3739c11a52eb20 Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Tue, 13 May 2025 20:44:19 +0100 Subject: [PATCH] Add option to build only nsis-web --- .github/workflows/build-electron.yml | 15 ++++++++++++++- package.json | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-electron.yml b/.github/workflows/build-electron.yml index 9a6d6179..e4fc9ef7 100644 --- a/.github/workflows/build-electron.yml +++ b/.github/workflows/build-electron.yml @@ -29,6 +29,14 @@ on: - true - false default: 'false' + nsisweb: + description: For Windows 11 builds, do you want to build only the nsis-web installer? + type: choice + required: false + options: + - true + - false + default: 'false' sign: description: Do you wish to sign the Windows packages? type: choice @@ -309,12 +317,17 @@ jobs: # ${{ env.INSTALL_DIR }}/eSignerCKATool.exe load echo "Building Windows packages..." if ($INPUT_SIGN) { - npm run publish + if (github.event.inputs.nsisweb -eq 'true') { + npm run publish-nsis-web + } else { + npm run publish + } } else { npm run build-skipsigning } ./scripts/Rewrite-DraftReleaseTag.ps1 - name: Build portable Electron app + if: github.event.inputs.nsisweb != 'true' run: | if (-not ($Env:CRON_LAUNCHED -or ($Env:INPUT_TARGET -eq 'nightly'))) { $GITHUB_TOKEN = $Env:GITHUB_TOKEN diff --git a/package.json b/package.json index 9e4c9864..62506824 100644 --- a/package.json +++ b/package.json @@ -135,6 +135,7 @@ "dist-linux": "electron-builder build --linux --projectDir dist", "dist-linux-appimage": "electron-builder build --linux AppImage:x64 --projectDir dist", "publish": "electron-builder build --projectDir dist", + "publish-nsis-web": "electron-builder build --win nsis-web --projectDir dist", "build-skipsigning": "electron-builder build --config ../scripts/electronBuilder.cjs --publish never --projectDir dist", "postpackage-win": "(robocopy archives bld\\Electron\\kiwix-js-pwa-win32-ia32\\resources\\app\\archives\\ > null) ^& IF %ERRORLEVEL% LSS 8 SET ERRORLEVEL = 0", "postpackage-linux": "(robocopy archives bld\\Electron\\kiwix-js-pwa-linux-x64\\archives\\ > null) ^& IF %ERRORLEVEL% LSS 8 SET ERRORLEVEL = 0"