When I build my game for testing, it’s a completely automated process from the command line.
I type pub.sh --test
on the command line and a long chain of events is started.
The script pushes to git, which starts the cloud based CI machine (Azure) building the Mac, Windows and Linux executables.
When they are done, my local script is notified and they are download locally.
Game files are added and they are signed and packaged up.
The script then logs into Steam and uploads the game.
A change list is built from the git log and uploaded to a private website.
When that is complete, a message is sent to Discord to notify testers that the build is done.
This is all done with no interaction on my part.
It makes doing test builds quick, easy, and painless. But more important is there is no human interaction, so there is less chance of a mistake being made.
To upload to Steam you need to authenticate, which usually involves getting an email and typing in a code or doing the same with their authentication app. It’s not very conducive to automated builds.
Fortunately Steam has an process where you authenticate once and then pass a token from the command line and that logs you in without a password. Wonderful.
This worked fine for what seem like years, then on Jan 1, 2025 I got a error saying my token was expired. OK, makes some sense.
I re-ran the process to get a new token and everything was fine for a day or so, then it failed again saying the token was expired. Then it happened again. And again.
Frustrated, I reached out to the friend who works at Valve and was put in contact with a programmer there. He watched the back-end and said everything was fine for the first few auths and then the old expired token as submitted. Rebuilding the token worked for a while and then the old token was submitted again.
We began to suspect the token file on my machine was being overwritten but I couldn’t see it happening and didn’t know how it was happening. It not like the whole directory was being restored from a backup, it was just that one file sitting in an obscure Steam folder.
We tried everything and never solved the problem.
The solution I finally arrive at – and has worked fine for the past three months – was to get an auth token and then save that file away. Just before my script uploads to Steam it copies that good file over the current one and uploads. This is what Steam recommends for full CI builds, but until Jan 1, I never had to do this locally.
I’m still mystified who is overwriting that file but I guess it’s moot now.