Skip to content

Commit 89b7b44

Browse files
Update build-and-sign-sequential.yml
1 parent a01ecfd commit 89b7b44

File tree

1 file changed

+36
-8
lines changed

1 file changed

+36
-8
lines changed

.github/workflows/build-and-sign-sequential.yml

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -564,19 +564,47 @@ jobs:
564564
if (Test-Path "build-installer.ps1") {
565565
.\build-installer.ps1
566566
567+
# Install Inno Setup if not available
568+
if (-not (Get-Command "iscc" -ErrorAction SilentlyContinue)) {
569+
Write-Output "Installing Inno Setup..."
570+
choco install innosetup -y
571+
if ($LASTEXITCODE -ne 0) {
572+
Write-Output "Failed to install Inno Setup"
573+
exit 1
574+
}
575+
}
576+
577+
# Compile the installer using Inno Setup
578+
Write-Output "Compiling installer with Inno Setup..."
579+
$issFile = "Setup.iss"
580+
if (Test-Path $issFile) {
581+
iscc $issFile
582+
if ($LASTEXITCODE -eq 0) {
583+
Write-Output "✅ Inno Setup compilation completed"
584+
} else {
585+
Write-Output "❌ Inno Setup compilation failed with exit code: $LASTEXITCODE"
586+
exit 1
587+
}
588+
} else {
589+
Write-Output "❌ Setup.iss not found"
590+
exit 1
591+
}
592+
567593
# Check if installer was built successfully
568594
if (Test-Path "output\*.exe") {
569595
Write-Output "✅ Installer built successfully"
570596
Get-ChildItem "output\*.exe" | ForEach-Object {
571597
Write-Output "Built installer: $($_.Name) ($(($_.Length / 1MB).ToString('F2')) MB)"
572598
}
573599
574-
# Set environment variable for later upload (relative to workflow root)
575-
$installerFile = (Get-ChildItem "output\*.exe" | Select-Object -First 1).Name
576-
$installerPath = "installer-repo\output\$installerFile"
577-
Write-Output "INSTALLER_PATH=$installerPath" >> $env:GITHUB_ENV
600+
# Get the actual installer file path for upload
601+
$installerFile = Get-ChildItem "output\*.exe" | Select-Object -First 1
602+
Write-Output "INSTALLER_NAME=$($installerFile.Name)" >> $env:GITHUB_ENV
578603
} else {
579604
Write-Output "❌ No installer executable found in output directory"
605+
Get-ChildItem "output" -ErrorAction SilentlyContinue | ForEach-Object {
606+
Write-Output "Found in output: $($_.Name)"
607+
}
580608
exit 1
581609
}
582610
} else {
@@ -593,11 +621,11 @@ jobs:
593621

594622
# Upload built installer
595623
- name: Upload Virtual Driver Installer
596-
if: env.INSTALLER_PATH != ''
624+
if: env.INSTALLER_NAME != ''
597625
uses: actions/upload-artifact@v4
598626
with:
599627
name: Virtual-Driver-Installer-${{ env.BUILD_CONFIGURATION }}-${{ env.RELEASE_TAG }}
600-
path: ${{ env.INSTALLER_PATH }}
628+
path: installer-repo/output/${{ env.INSTALLER_NAME }}
601629
continue-on-error: true
602630

603631
# Build Summary
@@ -641,8 +669,8 @@ jobs:
641669
}
642670
Write-Output ""
643671
Write-Output "Installer Build Status:"
644-
if ('${{ env.INSTALLER_PATH }}' -ne '') {
645-
Write-Output "✅ Virtual Driver Installer built successfully"
672+
if ('${{ env.INSTALLER_NAME }}' -ne '') {
673+
Write-Output "✅ Virtual Driver Installer built successfully: ${{ env.INSTALLER_NAME }}"
646674
} else {
647675
Write-Output "❌ Installer build failed or skipped"
648676
}

0 commit comments

Comments
 (0)