Skip to content

Commit 99e7436

Browse files
authored
Apply CoderabbitAI recommendations for configVdf section (#81)
* Apply CoderabbitAI recommendations for configVdf section * Update Steam deploy authentication methods and setup steps
1 parent c3ece44 commit 99e7436

File tree

1 file changed

+58
-10
lines changed

1 file changed

+58
-10
lines changed

README.md

+58-10
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,64 @@ Deploying to Steam using TOTP. If this is not passed, `configVdf` is required.
8787

8888
#### configVdf
8989

90-
Deploying to Steam requires using Multi-Factor Authentication (MFA) through Steam Guard unless `totp` is passed.
91-
This means that simply using username and password isn't enough to authenticate with Steam.
92-
However, it is possible to go through the MFA process only once by setting up GitHub Secrets for `configVdf` with these steps:
93-
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.
94-
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.
95-
1. Validate that the MFA process is complete by running `steamcmd +login <username> +quit` again. It should not ask for the MFA code again.
96-
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`.
97-
- macOS: `cat ~/Library/Application\ Support/Steam/config/config.vdf | base64 > config_base64.txt`
98-
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.
99-
2. If the action fails with `Logging in user ... to Steam Public...FAILED (License expired)`, then you need to regenerate your local VDF file with a new Steam guard code.
90+
Steam Deploy supports two authentication methods:
91+
92+
1. **Time-based One-Time Password (TOTP)** - Recommended if you have access to the shared secret.
93+
2. **Steam Guard MFA with `config.vdf`** - An alternative method requiring a one-time setup.
94+
95+
If you are using the `config.vdf` method, follow these steps to set up the required GitHub Secret:
96+
97+
1. **Install steamcmd**
98+
Install [Valve's official steamcmd](https://partner.steamgames.com/doc/sdk/uploading#1) on your local machine. All subsequent steps will also be performed on your local machine.
99+
100+
2. **Log in to Steam using steamcmd**
101+
Run the following command to log in:
102+
```bash
103+
steamcmd +login <username> <password> +quit
104+
```
105+
If prompted, check your email for the MFA code and provide it when requested.
106+
107+
3. **Validate MFA completion**
108+
To ensure MFA is complete, run:
109+
```bash
110+
steamcmd +login <username> +quit
111+
```
112+
If no MFA prompt appears, proceed to the next step.
113+
114+
4. **Locate and encode the `config.vdf` file**
115+
The location of the `config.vdf` file depends on your operating system:
116+
- **Windows/Linux**: The file is in the `config/config.vdf` relative to where you ran `steamcmd`.
117+
- **macOS**: The file is located at `~/Library/Application Support/Steam/config/config.vdf`.
118+
119+
Encode the file and store it as a GitHub Secret:
120+
```bash
121+
# Windows/Linux
122+
cat config/config.vdf | base64 > config_base64.txt
123+
124+
# macOS
125+
cat ~/Library/Application\ Support/Steam/config/config.vdf | base64 > config_base64.txt
126+
```
127+
⚠️ **IMPORTANT**: The encoded `config.vdf` contains sensitive authentication data. Ensure you:
128+
- Store it securely as a GitHub Secret named `STEAM_CONFIG_VDF`.
129+
- Never commit the raw or encoded `config.vdf` to your repository.
130+
- Rotate it periodically or if it is compromised.
131+
132+
5. **Handling new MFA code requests**
133+
If the GitHub Action requests a new MFA code, run:
134+
```bash
135+
steamcmd +set_steam_guard_code <code>
136+
```
137+
Generate a new encoded `config.vdf` file (see step 4) and update the `STEAM_CONFIG_VDF` GitHub Secret with its contents.
138+
139+
6. **Resolving 'License expired' error**
140+
If the action fails with the error `Logging in user ... to Steam Public...FAILED (License expired)`, follow these steps:
141+
- On your local machine, run:
142+
```bash
143+
steamcmd +login <username>
144+
```
145+
- Enter the new Steam Guard code sent to your email.
146+
- Generate a new encoded `config.vdf` file (see step 4).
147+
- Update your `STEAM_CONFIG_VDF` GitHub Secret with the new encoded value.
100148

101149
#### appId
102150

0 commit comments

Comments
 (0)