SteamCMD authenticate with API Key

331 views Asked by At

I have a GitHub Actions workflow that automatically pushes my game to steam:

steps:
  - name: Checkout repository
    uses: actions/[email protected]

  - name: Download build directories
    uses: actions/download-artifact@v2
    with:
      name: game-builds

  - name: Setup steamcmd
    run: |
      mkdir -p $HOME/steamcmd
      cd $HOME/steamcmd
      curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -

  - name: Upload to Steam
    run: |
      $HOME/steamcmd/steamcmd.sh +login ${{ secrets.STEAM_USERNAME }} ${{ secrets.STEAM_PASSWORD }} +run_app_build_http ./steam_deploy/lin_deploy.vdf +quit
      $HOME/steamcmd/steamcmd.sh +login ${{ secrets.STEAM_USERNAME }} ${{ secrets.STEAM_PASSWORD }} +run_app_build_http ./steam_deploy/win_deploy.vdf +quit

The problem I have is this workflow fails cause the computer (which will always change) is not allowed. GitHub spins up a new container when it runs each build.

here is the error:

Logging in user '***' to Steam Public...
This computer has not been authenticated for your account using Steam Guard.
Please check your email for the message from Steam, and enter the Steam Guard
 code from that message.
You can also enter this code at any time using 'set_steam_guard_code'
 at the console.
Steam Guard code:FAILED (Account Logon Denied)
Error: Process completed with exit code 5.

I would like to use the Web API key to deploy. This would help for future builds.

How would API key auth look in a GitHub Actions workflow for steamcmd?

0

There are 0 answers