Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for InstallScripts #72

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
buildDescription: v1.2.3
rootPath: build
depot1Path: StandaloneWindows64
depot1InstallScriptPath: StandaloneWindows64/install_script.vdf
depot2Path: StandaloneLinux64
releaseBranch: prerelease
```
Expand Down
36 changes: 36 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,57 @@ inputs:
depot1Path:
required: false
description: 'The path to depot1.'
depot1InstallScriptPath:
required: false
description: 'The path to the install script for depot1.'
depot2Path:
required: false
description: 'The path to depot2.'
depot2InstallScriptPath:
required: false
description: 'The path to the install script for depot2.'
depot3Path:
required: false
description: 'The path to depot3.'
depot3InstallScriptPath:
required: false
description: 'The path to the install script for depot3.'
depot4Path:
required: false
description: 'The path to depot4.'
depot4InstallScriptPath:
required: false
description: 'The path to the install script for depot4.'
depot5Path:
required: false
description: 'The path to depot5.'
depot5InstallScriptPath:
required: false
description: 'The path to the install script for depot5.'
depot6Path:
required: false
description: 'The path to depot6.'
depot6InstallScriptPath:
required: false
description: 'The path to the install script for depot6.'
depot7Path:
required: false
description: 'The path to depot7.'
depot7InstallScriptPath:
required: false
description: 'The path to the install script for depot7.'
depot8Path:
required: false
description: 'The path to depot8.'
depot8InstallScriptPath:
required: false
description: 'The path to the install script for depot8.'
depot9Path:
required: false
description: 'The path to depot9.'
depot9InstallScriptPath:
required: false
description: 'The path to the install script for depot9.'
releaseBranch:
required: false
description: 'The branch within steam that this build will be automatically put live on.'
Expand All @@ -70,12 +97,21 @@ runs:
buildDescription: ${{ inputs.buildDescription }}
rootPath: ${{ inputs.rootPath }}
depot1Path: ${{ inputs.depot1Path }}
depot1InstallScriptPath: ${{ inputs.depot1InstallScriptPath }}
depot2Path: ${{ inputs.depot2Path }}
depot2InstallScriptPath: ${{ inputs.depot2InstallScriptPath }}
depot3Path: ${{ inputs.depot3Path }}
depot3InstallScriptPath: ${{ inputs.depot3InstallScriptPath }}
depot4Path: ${{ inputs.depot4Path }}
depot4InstallScriptPath: ${{ inputs.depot4InstallScriptPath }}
depot5Path: ${{ inputs.depot5Path }}
depot5InstallScriptPath: ${{ inputs.depot5InstallScriptPath }}
depot6Path: ${{ inputs.depot6Path }}
depot6InstallScriptPath: ${{ inputs.depot6InstallScriptPath }}
depot7Path: ${{ inputs.depot7Path }}
depot7InstallScriptPath: ${{ inputs.depot7InstallScriptPath }}
depot8Path: ${{ inputs.depot8Path }}
depot8InstallScriptPath: ${{ inputs.depot8InstallScriptPath }}
depot9Path: ${{ inputs.depot9Path }}
depot9InstallScriptPath: ${{ inputs.depot9InstallScriptPath }}
releaseBranch: ${{ inputs.releaseBranch }}
16 changes: 15 additions & 1 deletion steam_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,26 @@ i=1;
export DEPOTS="\n "
until [ $i -gt 9 ]; do
eval "currentDepotPath=\$depot${i}Path"
eval "currentDepotInstallScriptPath=\$depot${i}InstallScriptPath"
if [ -n "$currentDepotPath" ]; then
# depot1Path uses firstDepotId, depot2Path uses firstDepotId + 1, depot3Path uses firstDepotId + 2...
currentDepot=$((firstDepotId + i - 1))

# If the depot has an install script, add it to the depot manifest
if [ -n "${currentDepotInstallScriptPath:-}" ]; then
echo ""
echo "Adding install script for depot ${currentDepot}..."
echo ""
installScriptDirective="\"InstallScript\" \"${currentDepotInstallScriptPath}\""
else
installScriptDirective=""
fi

echo ""
echo "Adding depot${currentDepot}.vdf ..."
echo ""
export DEPOTS="$DEPOTS \"$currentDepot\" \"depot${currentDepot}.vdf\"\n "

cat << EOF > "depot${currentDepot}.vdf"
"DepotBuildConfig"
{
Expand All @@ -48,6 +60,8 @@ until [ $i -gt 9 ]; do
"FileExclusion" "*.pdb"
"FileExclusion" "**/*_BurstDebugInformation_DoNotShip*"
"FileExclusion" "**/*_BackUpThisFolder_ButDontShipItWithYourGame*"

$installScriptDirective
}
EOF

Expand Down Expand Up @@ -88,7 +102,7 @@ if [ -n "$steam_totp" ]; then
echo "# Using SteamGuard TOTP #"
echo "#################################"
echo ""
else
else
if [ ! -n "$configVdf" ]; then
echo "Config VDF input is missing or incomplete! Cannot proceed."
exit 1
Expand Down