Skip to content

Commit b1c79e8

Browse files
setup-steamcmd@v1.0.6 (#8)
- ignore steam update return code
1 parent 5d9c42e commit b1c79e8

File tree

5 files changed

+35
-14
lines changed

5 files changed

+35
-14
lines changed

dist/index.js

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66081,13 +66081,15 @@ const IS_WINDOWS = process.platform === 'win32';
6608166081
const toolExtension = IS_WINDOWS ? '.exe' : '.sh';
6608266082
const toolPath = `${steamcmd}${toolExtension}`;
6608366083
async function Run() {
66084-
const [toolDirectory, steamDir] = await findOrDownload();
66084+
const [toolDirectory, steam_dir] = await findOrDownload();
6608566085
core.info(`${STEAM_CMD} -> ${toolDirectory}`);
6608666086
core.addPath(toolDirectory);
6608766087
const steam_cmd = path.join(toolDirectory, steamcmd, '..');
6608866088
core.exportVariable(STEAM_CMD, steam_cmd);
66089-
core.info(`${STEAM_DIR} -> ${steamDir}`);
66090-
core.exportVariable(STEAM_DIR, steamDir);
66089+
core.saveState('STEAM_CMD', steam_cmd);
66090+
core.info(`${STEAM_DIR} -> ${steam_dir}`);
66091+
core.exportVariable(STEAM_DIR, steam_dir);
66092+
core.saveState('STEAM_DIR', steam_dir);
6609166093
const steam_temp = path.join(process.env.RUNNER_TEMP, '.steamworks');
6609266094
try {
6609366095
await fs.promises.access(steam_temp, fs.constants.R_OK | fs.constants.W_OK);
@@ -66097,8 +66099,9 @@ async function Run() {
6609766099
}
6609866100
core.info(`${STEAM_TEMP} -> ${steam_temp}`);
6609966101
core.exportVariable(STEAM_TEMP, steam_temp);
66100-
await exec.exec(steamcmd, ['+help', '+quit']);
66101-
await restoreConfigCache(steamDir);
66102+
core.saveState('STEAM_TEMP', steam_temp);
66103+
await exec.exec(steamcmd, ['+help', '+quit'], { ignoreReturnCode: true });
66104+
await restoreConfigCache(steam_dir);
6610266105
}
6610366106
async function findOrDownload() {
6610466107
const allVersions = tc.findAllVersions(steamcmd);
@@ -79825,12 +79828,30 @@ const main = async () => {
7982579828
else {
7982679829
await (0, setup_1.SaveConfigCache)();
7982779830
core.info('steamcmd logs:');
79828-
await logging.PrintLogs(process.env.STEAM_TEMP);
79831+
const steam_temp = core.getState('STEAM_TEMP');
79832+
if (!steam_temp) {
79833+
core.error('STEAM_TEMP is not set, skipping logs');
79834+
}
79835+
else {
79836+
await logging.PrintLogs(steam_temp);
79837+
}
7982979838
if (process.platform === 'win32') {
79830-
await logging.PrintLogs(process.env.STEAM_CMD, true);
79839+
const steamCmd = core.getState('STEAM_CMD');
79840+
if (!steamCmd) {
79841+
core.error('STEAM_CMD is not set, skipping logs');
79842+
}
79843+
else {
79844+
await logging.PrintLogs(steamCmd, true);
79845+
}
7983179846
}
7983279847
else {
79833-
await logging.PrintLogs(process.env.STEAM_DIR, true);
79848+
const steamDir = core.getState('STEAM_DIR');
79849+
if (!steamDir) {
79850+
core.error('STEAM_DIR is not set, skipping logs');
79851+
}
79852+
else {
79853+
await logging.PrintLogs(steamDir);
79854+
}
7983479855
}
7983579856
}
7983679857
};

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "setup-steamcmd",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "A GitHub Action to setup the steamcmd command alias.",
55
"author": "buildalon",
66
"repository": {
@@ -35,4 +35,4 @@
3535
"bundle": "ncc build src/index.ts -o dist --source-map --license licenses.txt",
3636
"clean": "npm install && shx rm -rf dist/ out/ node_modules/ && npm ci"
3737
}
38-
}
38+
}

src/setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export async function Run(): Promise<void> {
3535
core.info(`${STEAM_TEMP} -> ${steam_temp}`);
3636
core.exportVariable(STEAM_TEMP, steam_temp);
3737
core.saveState('STEAM_TEMP', steam_temp);
38-
await exec.exec(steamcmd, ['+help', '+quit']);
38+
await exec.exec(steamcmd, ['+help', '+quit'], { ignoreReturnCode: true });
3939
await restoreConfigCache(steam_dir);
4040
}
4141

0 commit comments

Comments
 (0)