TS Publish
Usage
index.ts [-h] [-o addon.gma] [--config CONFIG] [-u USERNAME]
<Action> <Addon Directory>
Create .GMA files and upload to steam workshop
Positional arguments:
<Action>
<Addon Directory>
Optional arguments:
-h, --help Show this help message and exit.
-o addon.gma, --out addon.gma
--config CONFIG
-u USERNAME, --username USERNAME
-p PASSWORD, --password PASSWORD
Configuration
Addon directories must contain an addon.yml
file.
View src/addon.ts
for more information on the file format.
An example file can be found inside this repository's data/addon.yml
-
title
,author
anddescription
should be self-explanatory -
icon_path
is a path relative toaddon.yml
; it should point to a 512x512px PNG or JPEG image. -
ignore
is a list of .gitignore-compatible entries. View: https://github.com/kaelzhang/node-ignore/tree/3.2.4 -
workshop_id
is a string representing a 64-bit unsigned integer. If specified,index.ts publish
will update the given workshop item instead of publishing a new one. If it is not present,index.ts publish
will automatically append it to the end of the file with the newly published entry.
*To publish addons to the workshop, you must either have SteamCMD installed, use the -legacy
publisher or -gmpublish
publisher.
The SteamCMD and gmpublish publishers need login credentials.
This can be done by either copying the .tspublish.yml.example
file to your home directory, or by providing the --username
and --password
command line arguments or setting the STEAM_USER
, STEAM_PASS
and STEAM_GUARD
environment variables. If you are using a CI environment in which SteamCMD has cached credentials (with sentry file), you need to set STEAM_GUARD=0
to disable the steamguard prompt.
You can omit the password entry in the configuration file as well as the --password
argument if you wish to be prompted to enter it manually.
Important Note: the prompt will not hide your password, so be careful.
Authentication over SSH keyboard-interactive
Due to Steam's email two-factor authentication, we must either provide the Steam client with a 'sentry' file or the latest generated 2FA OPT code.
Providing a sentry file to CI runners (Especially public ones) in a secure manner, proves to be difficult, as the standard protected environment variables cannot hold pure binary data and most CI environments can't hold the sentry file size even if base64 encoding is used.
This is why TSPublish will attempt to host an ad-hoc keyboard-interactive session over the SSH protocol on port 2222 when no password is provided and the -remote
flag is passed.
This keyboard-interactive session will ask you for a one-time password to be output in the CI job as well as your Steam username, password and OTP, after which the session will be closed and TSPublish will proceed to upload the contents.
There is a two-minute timeout starting from the time the SSH server boots up after which the session will be closed and return a non-zero exit code.