diff --git a/scripts/steam_deploy.sh b/scripts/steam_deploy.sh new file mode 100755 index 00000000..138885f2 --- /dev/null +++ b/scripts/steam_deploy.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +set -euo pipefail + +APP_ID=4435320 +DEPOT_WIN=4435321 +DEPOT_LINUX=4435322 +REPO="edde746/plezy" + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +WORK="$SCRIPT_DIR/build" + +# Get latest release tag +TAG=$(gh release view --repo "$REPO" --json tagName -q .tagName) +echo "Latest release: $TAG" + +rm -rf "$WORK" +mkdir -p "$WORK" + +# Download & extract +echo "Downloading Windows build..." +gh release download "$TAG" --repo "$REPO" -p "plezy-windows-x64-portable.7z" -D "$WORK" +if [[ "$OSTYPE" == "darwin"* ]]; then + unar -o "$WORK" "$WORK/plezy-windows-x64-portable.7z" +else + 7z x "$WORK/plezy-windows-x64-portable.7z" -o"$WORK" -y +fi +mv "$WORK"/plezy-windows-x64-portable "$WORK/windows" + +echo "Downloading Linux build..." +gh release download "$TAG" --repo "$REPO" -p "plezy-linux-x64.tar.gz" -D "$WORK" +mkdir -p "$WORK/linux" +tar xzf "$WORK/plezy-linux-x64.tar.gz" -C "$WORK/linux" + +# Generate VDF files +cat > "$WORK/app_build.vdf" <