-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish-steam.ps1
31 lines (28 loc) · 948 Bytes
/
publish-steam.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
param(
$Version=$args[0],
$Account="[email protected]",
$Project=(Split-Path (Get-Location) -Leaf),
$SteamCmd="steamcmd"
)
if ( -not $Version ) {
echo "Usage: publish-steam.ps1 <Version>"
echo "(after downloading artifacts via download-artifacts.sh)"
Exit 1
}
function Extract {
param($Channel=$args[0])
$File=(Get-Item "$Project-$Version-$Channel.zip")
if ($File) {
Expand-Archive -Force -Path $File -DestinationPath .
}
return $File
}
$Windows=(Extract "win-64")
$Linux=(Extract "linux-x86_64")
$WindowsDemo=(Extract "demo-win-64")
$LinuxDemo=(Extract "demo-linux-x86_64")
$AppBuildFull=(Get-Item steam/app_build_full.vdf)
$runAppBuildFull=($Windows && $Linux ? "+run_app_build $AppBuildFull" : "")
$AppBuildDemo=(Get-Item steam/app_build_demo.vdf)
$runAppBuildDemo=($WindowsDemo && $LinuxDemo ? "+run_app_build $AppBuildDemo" : "")
& $SteamCmd +login $Account +run_app_build $AppBuildFull +run_app_build $AppBuildDemo +quit