Skip to content

Update GameLibs

Update GameLibs #43

name: Update GameLibs
on:
workflow_dispatch:
inputs:
game:
description: Name of game folder in `Games` directory
required: true
type: string
workflow_call:
inputs:
game:
required: true
type: string
jobs:
game-update-check:
name: Check ${{ inputs.game }} for outdated package versions
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
buildIds: ${{ steps.check-versions.outputs.outdated-version-buildIds }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.x"
- name: Setup SteamCMD
uses: Lordfirespeed/setup-steamcmd@v2
- name: Authenticate SteamCMD
uses: Lordfirespeed/auth-steamcmd@v1
with:
steam_config_vdf: ${{ secrets.steam_config_vdf }}
steam_username: ${{ secrets.steam_username }}
- name: Configure Git
run: |
git config user.email "[email protected]"
git config user.name "GitHub Action"
- name: Check versions up-to-date
id: check-versions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./build.sh --target CheckPackageVersionsUpToDate --game ${{ inputs.game }} --steam-username ${{ secrets.steam_username }}
dispatch-game-version-package-updates:
needs: game-update-check
if: ${{ needs.game-update-check.outputs.buildIds != '[]' && needs.game-update-check.outputs.buildIds != '' }}
strategy:
matrix:
buildId: ${{ fromJson(needs.game-update-check.outputs.buildIds) }}
fail-fast: false
uses: ./.github/workflows/updateGameVersionPackage.yml
with:
game: ${{ inputs.game }}
buildId: ${{ matrix.buildId }}
secrets: inherit