From 4cae520566994fb97cd216216a8acdd11ded5c3c Mon Sep 17 00:00:00 2001 From: Minionguyjpro Date: Thu, 21 Aug 2025 17:56:24 +0200 Subject: [PATCH] Add functionality to download Inno Setup through WinGet, to workaround removal of Inno Setup from future GitHub Actions Windows Server runner images --- src/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/index.js b/src/index.js index 336b600..0fa4545 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,6 @@ import * as core from "@actions/core"; import { promises as fs } from "fs"; +import { exec } from "child_process"; import { execFile } from "child_process"; const workspacePath = process.env.GITHUB_WORKSPACE; @@ -27,6 +28,17 @@ async function run() { str.replace(/(["'])/g, "$1"), ); + exec( + `winget install --id JRSoftware.InnoSetup -e -s winget -h`, + (execError, stdout, stderr) => { + console.log(stdout,stderr); + if (execError) { + core.setFailed(`Failed to install Inno Setup: ${stderr}`); + process.exit(execError.code || 1); + } + }, + ); + execFile( `${process.env["ProgramFiles(x86)"]}\\Inno Setup 6\\iscc.exe`, [...escapedOptions, `${workspacePath}\\${path}`],