mirror of
https://github.com/Minionguyjpro/Inno-Setup-Action
synced 2026-02-18 01:31:15 +01:00
Add functionality to download Inno Setup through WinGet, to workaround removal of Inno Setup from future GitHub Actions Windows Server runner images
This commit is contained in:
12
src/index.js
12
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}`],
|
||||
|
||||
Reference in New Issue
Block a user