Skip to content

Commit a81fa5a

Browse files
Add support for InstallScripts
1 parent 445b5ee commit a81fa5a

File tree

3 files changed

+52
-1
lines changed

3 files changed

+52
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
buildDescription: v1.2.3
4747
rootPath: build
4848
depot1Path: StandaloneWindows64
49+
depot1InstallScriptPath: StandaloneWindows64/install_script.vdf
4950
depot2Path: StandaloneLinux64
5051
releaseBranch: prerelease
5152
```

action.yml

+36
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,57 @@ inputs:
2828
depot1Path:
2929
required: false
3030
description: 'The path to depot1.'
31+
depot1InstallScriptPath:
32+
required: false
33+
description: 'The path to the install script for depot1.'
3134
depot2Path:
3235
required: false
3336
description: 'The path to depot2.'
37+
depot2InstallScriptPath:
38+
required: false
39+
description: 'The path to the install script for depot2.'
3440
depot3Path:
3541
required: false
3642
description: 'The path to depot3.'
43+
depot3InstallScriptPath:
44+
required: false
45+
description: 'The path to the install script for depot3.'
3746
depot4Path:
3847
required: false
3948
description: 'The path to depot4.'
49+
depot4InstallScriptPath:
50+
required: false
51+
description: 'The path to the install script for depot4.'
4052
depot5Path:
4153
required: false
4254
description: 'The path to depot5.'
55+
depot5InstallScriptPath:
56+
required: false
57+
description: 'The path to the install script for depot5.'
4358
depot6Path:
4459
required: false
4560
description: 'The path to depot6.'
61+
depot6InstallScriptPath:
62+
required: false
63+
description: 'The path to the install script for depot6.'
4664
depot7Path:
4765
required: false
4866
description: 'The path to depot7.'
67+
depot7InstallScriptPath:
68+
required: false
69+
description: 'The path to the install script for depot7.'
4970
depot8Path:
5071
required: false
5172
description: 'The path to depot8.'
73+
depot8InstallScriptPath:
74+
required: false
75+
description: 'The path to the install script for depot8.'
5276
depot9Path:
5377
required: false
5478
description: 'The path to depot9.'
79+
depot9InstallScriptPath:
80+
required: false
81+
description: 'The path to the install script for depot9.'
5582
releaseBranch:
5683
required: false
5784
description: 'The branch within steam that this build will be automatically put live on.'
@@ -70,12 +97,21 @@ runs:
7097
buildDescription: ${{ inputs.buildDescription }}
7198
rootPath: ${{ inputs.rootPath }}
7299
depot1Path: ${{ inputs.depot1Path }}
100+
depot1InstallScriptPath: ${{ inputs.depot1InstallScriptPath }}
73101
depot2Path: ${{ inputs.depot2Path }}
102+
depot2InstallScriptPath: ${{ inputs.depot2InstallScriptPath }}
74103
depot3Path: ${{ inputs.depot3Path }}
104+
depot3InstallScriptPath: ${{ inputs.depot3InstallScriptPath }}
75105
depot4Path: ${{ inputs.depot4Path }}
106+
depot4InstallScriptPath: ${{ inputs.depot4InstallScriptPath }}
76107
depot5Path: ${{ inputs.depot5Path }}
108+
depot5InstallScriptPath: ${{ inputs.depot5InstallScriptPath }}
77109
depot6Path: ${{ inputs.depot6Path }}
110+
depot6InstallScriptPath: ${{ inputs.depot6InstallScriptPath }}
78111
depot7Path: ${{ inputs.depot7Path }}
112+
depot7InstallScriptPath: ${{ inputs.depot7InstallScriptPath }}
79113
depot8Path: ${{ inputs.depot8Path }}
114+
depot8InstallScriptPath: ${{ inputs.depot8InstallScriptPath }}
80115
depot9Path: ${{ inputs.depot9Path }}
116+
depot9InstallScriptPath: ${{ inputs.depot9InstallScriptPath }}
81117
releaseBranch: ${{ inputs.releaseBranch }}

steam_deploy.sh

+15-1
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,26 @@ i=1;
2727
export DEPOTS="\n "
2828
until [ $i -gt 9 ]; do
2929
eval "currentDepotPath=\$depot${i}Path"
30+
eval "currentDepotInstallScriptPath=\$depot${i}InstallScriptPath"
3031
if [ -n "$currentDepotPath" ]; then
3132
# depot1Path uses firstDepotId, depot2Path uses firstDepotId + 1, depot3Path uses firstDepotId + 2...
3233
currentDepot=$((firstDepotId + i - 1))
3334

35+
# If the depot has an install script, add it to the depot manifest
36+
if [ -n "${currentDepotInstallScriptPath:-}" ]; then
37+
echo ""
38+
echo "Adding install script for depot ${currentDepot}..."
39+
echo ""
40+
installScriptDirective="\"InstallScript\" \"${currentDepotInstallScriptPath}\""
41+
else
42+
installScriptDirective=""
43+
fi
44+
3445
echo ""
3546
echo "Adding depot${currentDepot}.vdf ..."
3647
echo ""
3748
export DEPOTS="$DEPOTS \"$currentDepot\" \"depot${currentDepot}.vdf\"\n "
49+
3850
cat << EOF > "depot${currentDepot}.vdf"
3951
"DepotBuildConfig"
4052
{
@@ -48,6 +60,8 @@ until [ $i -gt 9 ]; do
4860
"FileExclusion" "*.pdb"
4961
"FileExclusion" "**/*_BurstDebugInformation_DoNotShip*"
5062
"FileExclusion" "**/*_BackUpThisFolder_ButDontShipItWithYourGame*"
63+
64+
$installScriptDirective
5165
}
5266
EOF
5367

@@ -88,7 +102,7 @@ if [ -n "$steam_totp" ]; then
88102
echo "# Using SteamGuard TOTP #"
89103
echo "#################################"
90104
echo ""
91-
else
105+
else
92106
if [ ! -n "$configVdf" ]; then
93107
echo "Config VDF input is missing or incomplete! Cannot proceed."
94108
exit 1

0 commit comments

Comments
 (0)