Skip to content

Commit 26412a2

Browse files
authored
Refactor for steam MFA changes #56 (#57)
* Update steam_deploy.sh Bypass ssfnFileName handling * Update steam_deploy.sh * remove defunct inputs; clean up deploy script; update docs for vdf option * adding missing vdf readme updates
1 parent 6e43716 commit 26412a2

File tree

3 files changed

+15
-39
lines changed

3 files changed

+15
-39
lines changed

README.md

+8-18
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,8 @@ jobs:
3939
steps:
4040
- uses: game-ci/steam-deploy@v2
4141
with:
42-
username: ${{ secrets.STEAM_USERNAME }}
43-
password: ${{ secrets.STEAM_PASSWORD }}
44-
configVdf: ${{ secrets.STEAM_CONFIG_VDF}}
45-
ssfnFileName: ${{ secrets.STEAM_SSFN_FILE_NAME }}
46-
ssfnFileContents: ${{ secrets.STEAM_SSFN_FILE_CONTENTS }}
42+
username: ${{ secrets.STEAM_USERNAME }}
43+
configVdf: ${{ secrets.STEAM_CONFIG_VDF}}
4744
appId: 1234560
4845
buildDescription: v1.2.3
4946
rootPath: build
@@ -66,8 +63,7 @@ jobs:
6663
shared_secret: ${{ secrets.STEAM_SHARED_SECRET }}
6764
- uses: game-ci/steam-deploy@v2
6865
with:
69-
username: ${{ secrets.STEAM_USERNAME }}
70-
password: ${{ secrets.STEAM_PASSWORD }}
66+
username: ${{ secrets.STEAM_USERNAME }}
7167
totp: ${{ steps.steam-totp.outputs.code }}
7268
appId: 1234560
7369
buildDescription: v1.2.3
@@ -83,26 +79,20 @@ jobs:
8379
8480
The username of the Steam Build Account that you created in setup step 1.
8581
86-
#### password
87-
88-
The password of the Steam Build Account that you created in setup step 1.
89-
9082
#### totp
9183
92-
Deploying to Steam using TOTP. If this is not passed, `configVdf`, `ssfnFileName`, and `ssfnFileContents` are required.
84+
Deploying to Steam using TOTP. If this is not passed, `configVdf` is required.
9385

94-
#### configVdf, ssfnFileName, and ssfnFileContents
86+
#### configVdf
9587

9688
Deploying to Steam requires using Multi-Factor Authentication (MFA) through Steam Guard unless `totp` is passed.
9789
This means that simply using username and password isn't enough to authenticate with Steam.
98-
However, it is possible to go through the MFA process only once by setting up GitHub Secrets for configVdf, ssfnFileName, and ssfnFileContents with these steps:
90+
However, it is possible to go through the MFA process only once by setting up GitHub Secrets for configVdf with these steps:
9991
1. Install [Valve's offical steamcmd](https://partner.steamgames.com/doc/sdk/uploading#1) on your local machine. All following steps will also be done on your local machine.
10092
1. Try to login with `steamcmd +login <username> <password> +quit`, which may prompt for the MFA code. If so, type in the MFA code that was emailed to your builder account's email address.
101-
1. Validate that the MFA process is complete by running `steamcmd +login <username> <password> +quit` again. It should not ask for the MFA code again.
93+
1. Validate that the MFA process is complete by running `steamcmd +login <username> +quit` again. It should not ask for the MFA code again.
10294
1. The folder from which you run `steamcmd` will now contain an updated `config/config.vdf` file. Use `cat config/config.vdf | base64 > config_base64.txt` to encode the file. Copy the contents of `config_base64.txt` to a GitHub Secret `STEAM_CONFIG_VDF`.
103-
1. Find the SSFN file, depending on your platform. **Windows**: The `steamcmd` folder will also contain two files of which the names look like `ssfn<numbers>`. **One of them is a hidden file**. [Find that hidden file](https://support.microsoft.com/en-us/windows/view-hidden-files-and-folders-in-windows-97fbc472-c603-9d90-91d0-1166d1d9f4b5) and use that hidden file as the correct SSFN file for the following steps. **Linux**: The SSFN file will be in the `steamcmd` folder. **Mac**: The SSFN will be at `~/Library/Application\ Support/Steam/`.
104-
1. Copy the name of the SSFN file to a GitHub Secret `STEAM_SSFN_FILE_NAME`.
105-
1. Use `cat <ssfnFileName> | base64 > ssfn_base64.txt` to encode the contents of the SSFN file. Copy the encoded contents inside `ssfn_base64.txt` to a GitHub Secret called `STEAM_SSFN_FILE_CONTENTS`.
95+
1. `If:` when running the action you recieve another MFA code via email, run `steamcmd +set_steam_guard_code <code>` on your local machine and repeat the `config.vdf` encoding and replace secret `STEAM_CONFIG_VDF` with its contents.
10696

10797
#### appId
10898

action.yml

+2-12
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,13 @@ inputs:
55
username:
66
required: true
77
default: ''
8-
description: 'The username of your builder account.'
9-
password:
10-
required: true
11-
default: ''
12-
description: 'The password of your builder account.'
8+
description: 'The username of your builder account.'
139
totp:
1410
required: false
1511
description: 'The TOTP to use for login. If set, `configVdf`, `ssfnFileName`, and `ssfnFileContents` will be ignored.'
1612
configVdf:
1713
required: false
18-
description: 'The contents of STEAM_HOME/config/config.vdf. Required if `totp` is not set.'
19-
ssfnFileName:
20-
required: false
21-
description: 'The basename of the STEAM_HOME/ssfn file. Required if `totp` is not set.'
22-
ssfnFileContents:
23-
required: false
24-
description: 'The contents of the file at STEAM_HOME/ssfnFileName. Required if `totp` is not set.'
14+
description: 'The contents of STEAM_HOME/config/config.vdf. Required if `totp` is not set.'
2515
appId:
2616
required: true
2717
default: ''

steam_deploy.sh

+5-9
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ if [ -n "$steam_totp" ]; then
8888
echo "# Using SteamGuard TOTP #"
8989
echo "#################################"
9090
echo ""
91-
else
92-
if [ ! -n "$configVdf" ] || [ ! -n "$ssfnFileName" ] || [ ! -n "$ssfnFileContents" ]; then
93-
echo "MFA inputs are missing or incomplete! Cannot proceed."
91+
else
92+
if [ ! -n "$configVdf" ]; then
93+
echo "Config VDF input is missing or incomplete! Cannot proceed."
9494
exit 1
9595
fi
9696

@@ -110,10 +110,6 @@ else
110110
echo "$configVdf" | base64 -d > "$steamdir/config/config.vdf"
111111
chmod 777 "$steamdir/config/config.vdf"
112112

113-
echo "Copying $steamdir/ssfn..."
114-
echo "$ssfnFileContents" | base64 -d > "$steamdir/$ssfnFileName"
115-
chmod 777 "$steamdir/$ssfnFileName"
116-
117113
echo "Finished Copying SteamGuard Files!"
118114
echo ""
119115
fi
@@ -124,7 +120,7 @@ echo "# Test login #"
124120
echo "#################################"
125121
echo ""
126122

127-
steamcmd +set_steam_guard_code "$steam_totp" +login "$steam_username" "$steam_password" +quit;
123+
steamcmd +set_steam_guard_code "$steam_totp" +login "$steam_username" +quit;
128124

129125
ret=$?
130126
if [ $ret -eq 0 ]; then
@@ -150,7 +146,7 @@ echo "# Uploading build #"
150146
echo "#################################"
151147
echo ""
152148

153-
steamcmd +login "$steam_username" "$steam_password" +run_app_build "$manifest_path" +quit || (
149+
steamcmd +login "$steam_username" +run_app_build "$manifest_path" +quit || (
154150
echo ""
155151
echo "#################################"
156152
echo "# Errors #"

0 commit comments

Comments
 (0)