Skip to content

Commit d58195d

Browse files
committed
🔐 fix steam home path
1 parent 36a003d commit d58195d

File tree

4 files changed

+6
-20
lines changed

4 files changed

+6
-20
lines changed

action.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ name: 'Steam deploy'
22
author: Nikolay Kharitonov <[email protected]>
33
description: 'Deploy games to Steam with Steamworks SDK'
44
inputs:
5-
steamdir:
6-
required: true
7-
default: ''
8-
description: 'The directory where steamworks library is installed.'
95
username:
106
required: true
117
default: ''

dist/index.js

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

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,18 @@ async function run() {
6060
await fs.writeFile(manifestPath, manifestText);
6161
core.info(manifestText);
6262

63-
const steamdir = core.getInput('steamdir');
63+
const steamdir = `${process.env['HOME']}/Steam`;
6464
core.info(`steamdir: ${steamdir}`);
6565
await fs.mkdir(`${steamdir}/config`);
6666

6767
await fs.writeFile(`${steamdir}/config/config.vdf`, Buffer.from(core.getInput('configVdf'), 'base64'));
68-
await fs.writeFile(`/opt/${core.getInput('ssfnFileName')}`, Buffer.from(core.getInput('ssfnFileContents'), 'base64'));
68+
await fs.writeFile(`${steamdir}/${core.getInput('ssfnFileName')}`, Buffer.from(core.getInput('ssfnFileContents'), 'base64'));
6969

7070
const executable = `steamcmd`;
7171

7272
const username = core.getInput('username');
7373
const password = core.getInput('password');
74-
const result = await exec.exec(executable, ['+set_steam_guard_code', 'INVALID', '+login', username, password, '+quit']);
74+
const result = await exec.exec(executable, ['+login', username, password, '+quit']);
7575
//const result = await exec.exec(executable, ['+quit']);
7676
core.info(`SteamCMD result: ${result}`);
7777

index.test.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
const wait = require('./wait');
2-
const process = require('process');
3-
const cp = require('child_process');
4-
const path = require('path');
52

63
test('throws invalid number', async () => {
74
await expect(wait('foo')).rejects.toThrow('milliseconds not a number');
@@ -15,10 +12,3 @@ test('wait 500 ms', async () => {
1512
expect(delta).toBeGreaterThanOrEqual(500);
1613
});
1714

18-
// shows how the runner will run a javascript action with env / stdout protocol
19-
test('test runs', () => {
20-
process.env['INPUT_MILLISECONDS'] = 100;
21-
const ip = path.join(__dirname, 'index.js');
22-
const result = cp.execSync(`node ${ip}`, {env: process.env}).toString();
23-
console.log(result);
24-
})

0 commit comments

Comments
 (0)