diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index a616d75..93ad145 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -54,9 +54,19 @@ jobs: sudo apt-get update sudo apt-get install -y fakeroot rpm libsecret-1-dev pkg-config - - name: Install WiX Toolset + - name: Ensure WiX Toolset if: matrix.platform == 'win32' && matrix.arch == 'x64' - run: choco install wixtoolset --version=3.14.0 -y + shell: powershell + run: | + $installed = choco list --local-only wixtoolset --exact --limit-output + if (-not $installed) { + choco install wixtoolset --version=3.14.0 -y + } elseif ($installed -match '^wixtoolset\|3\.14(\.|$)') { + Write-Host "WiX Toolset already compatible: $installed" + } else { + Write-Host "Incompatible WiX Toolset detected: $installed" + choco upgrade wixtoolset --version=3.14.0 --allow-downgrade -y + } - name: Install dependencies run: npm ci