diff --git a/.github/workflows/cura-all-installers.yml b/.github/workflows/cura-all-installers.yml index e8501875a8..7848f3513b 100644 --- a/.github/workflows/cura-all-installers.yml +++ b/.github/workflows/cura-all-installers.yml @@ -1,5 +1,5 @@ name: Cura All Installers -run-name: ${{ inputs.cura_conan_version }} for Windows ${{ inputs.build_windows }}, MacOS ${{ inputs.build_macos }}, Linux ${{ inputs.build_linux }} +run-name: ${{ inputs.cura_conan_version }} for Windows exe ${{ inputs.build_windows_exe }}, for Windows msi ${{ inputs.build_windows_msi }}, MacOS ${{ inputs.build_macos }}, Linux ${{ inputs.build_linux }} on: workflow_dispatch: @@ -34,8 +34,13 @@ on: default: true required: true type: boolean - build_windows: - description: 'Build for Windows' + build_windows_exe: + description: 'Build for Windows exe' + default: false + required: true + type: boolean + build_windows_msi: + description: 'Build for Windows msi' default: true required: true type: boolean @@ -55,8 +60,8 @@ on: - cron: '25 3 * * 1-5' jobs: - windows-installer-create: - if: ${{ inputs.build_windows }} + windows-installer-create-exe: + if: ${{ inputs.build_windows_exe }} uses: ./.github/workflows/cura-installer.yml with: platform: 'windows-2022' @@ -67,6 +72,22 @@ jobs: enterprise: ${{ inputs.enterprise }} staging: ${{ inputs.staging }} installer: ${{ inputs.installer }} + msi: false + secrets: inherit + + windows-installer-create-msi: + if: ${{ inputs.build_windows_msi }} + uses: ./.github/workflows/cura-installer.yml + with: + platform: 'windows-2022' + os_name: 'win64' + cura_conan_version: ${{ inputs.cura_conan_version }} + conan_args: ${{ inputs.conan_args }} + conan_config: ${{ inputs.conan_config }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + installer: ${{ inputs.installer }} + msi: true secrets: inherit linux-installer-create: diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index 2ca322249b..778116684a 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -44,6 +44,11 @@ on: default: true required: true type: boolean + msi: + description: 'Create the msi' + default: false + required: false + type: boolean env: CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }} @@ -238,19 +243,33 @@ jobs: run: Compress-Archive -Path ".\UltiMaker-Cura" -DestinationPath ".\UltiMaker-Cura-$Env:CURA_VERSION_FULL-${{ inputs.os_name }}.zip" working-directory: dist + - name: Create the Windows exe installer (Powershell) + if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Windows' && github.event.inputs.msi == 'false' }} + run: | + python ..\cura_inst\packaging\NSIS\create_windows_installer.py ../cura_inst . "UltiMaker-Cura-$Env:CURA_VERSION_FULL-${{ inputs.os_name }}.exe" + working-directory: dist + - name: Create the Windows msi installer (Powershell) - if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Windows' }} + if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Windows' && github.event.inputs.msi == 'true' }} run: | python ..\cura_inst\packaging\msi\create_windows_msi.py ..\cura_inst .\UltiMaker-Cura "UltiMaker-Cura-$Env:CURA_VERSION_FULL-${{ inputs.os_name }}.msi" "$Env:CURA_APP_NAME" working-directory: dist - - name: Sign the Windows exe installer (Powershell) - if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Windows' }} - env: - PFX_PATH: ${{ steps.create-pfx.outputs.PFX_PATH }} - run: | - & "C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe" sign /f $Env:PFX_PATH /p "$Env:WIN_CERT_INSTALLER_CER_PASS" /fd SHA256 /t http://timestamp.digicert.com "UltiMaker-Cura-$Env:CURA_VERSION_FULL-${{ inputs.os_name }}.exe" - working-directory: dist + - name: Sign the Windows exe installer (Powershell) + if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Windows' && github.event.inputs.msi == 'false' }} + env: + PFX_PATH: ${{ steps.create-pfx.outputs.PFX_PATH }} + run: | + & "C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe" sign /f $Env:PFX_PATH /p "$Env:WIN_CERT_INSTALLER_CER_PASS" /fd SHA256 /t http://timestamp.digicert.com "UltiMaker-Cura-$Env:CURA_VERSION_FULL-${{ inputs.os_name }}.exe" + working-directory: dist + + - name: Sign the Windows msi installer (Powershell) + if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Windows' && github.event.inputs.msi == 'true' }} + env: + PFX_PATH: ${{ steps.create-pfx.outputs.PFX_PATH }} + run: | + & "C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe" sign /f $Env:PFX_PATH /p "$Env:WIN_CERT_INSTALLER_CER_PASS" /fd SHA256 /t http://timestamp.digicert.com "UltiMaker-Cura-$Env:CURA_VERSION_FULL-${{ inputs.os_name }}.msi" + working-directory: dist - name: Create the Linux AppImage (Bash) if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Linux' }}