diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b9ae5969c3..382a6a3cd2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -453,6 +453,76 @@ jobs: prerelease: ${{ needs.configuration.outputs.prerelease }} tag_name: ${{ needs.configuration.outputs.version }} files: releases/* + + publish_steam: + name: Publish Steam Release + needs: [configuration, build] + if: | + github.event_name == 'push' && + github.repository == 'icosa-gallery/open-brush' && + (github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags/v')) + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + lfs: true # We don't use LFS, but it adds no time, and leave it here in case we do at some point later + - name: Setup steamcmd + uses: CyberAndrii/setup-steamcmd@v1.1.1 + - name: Restore steam login config + run: | + mkdir -p /home/runner/Steam/config + echo "${{ secrets.STEAM_CONFIG_VDF}}" | base64 -d - > /home/runner/Steam/config/config.vdf + echo "${{ secrets.STEAM_SSFN }}" | base64 -d - > /home/runner/Steam/${{ secrets.STEAM_SSFN_FILENAME }} + - name: Download Build Artifacts (Windows SteamVR) + uses: actions/download-artifact@v2 + with: + name: Windows SteamVR + path: build_windows_steamvr + - name: Download Build Artifacts (Windows SteamVR Experimental) + uses: actions/download-artifact@v2 + with: + name: Windows SteamVR Experimental + path: build_windows_steamvr_experimental + - name: Upload Regular Build + run: | + pip install -U j2cli + j2 Support/steam/app.vdf.j2 > build_windows_steamvr/app.vdf + j2 Support/steam/main_depot.vdf.j2 > build_windows_steamvr/main_depot.vdf + cp Support/steam/installscript_win.vdf build_windows_steamvr/ + steamcmd +login $STEAM_USERNAME $STEAM_PASSWORD +run_app_build $(pwd)/build_windows_steamvr/app.vdf +quit + env: + STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }} + STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }} + VERSION: ${{ needs.configuration.outputs.version }} + OPEN_BRUSH_APP_ID: 1634870 + OPEN_BRUSH_WINDOWS_DEPOT_ID: 1634871 + CHANNEL: prerelease + - name: Upload Experimental Build + run: | + pip install -U j2cli + j2 Support/steam/app.vdf.j2 > build_windows_steamvr_experimental/app.vdf + j2 Support/steam/main_depot.vdf.j2 > build_windows_steamvr_experimental/main_depot.vdf + cp Support/steam/installscript_win.vdf build_windows_steamvr_experimental/ + steamcmd +login $STEAM_USERNAME $STEAM_PASSWORD +run_app_build $(pwd)/build_windows_steamvr_experimental/app.vdf +quit + env: + STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }} + STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }} + VERSION: ${{ needs.configuration.outputs.version }} + OPEN_BRUSH_APP_ID: 1634870 + OPEN_BRUSH_WINDOWS_DEPOT_ID: 1634871 + CHANNEL: prerelease-experimental + - name: Save logs + uses: actions/upload-artifact@v2 + if: ${{ failure() }} + with: + name: steamcmd logs + path: build_output/ + + publish_oculus: name: Publish Oculus Release needs: [configuration, build] diff --git a/Support/steam/app.vdf.j2 b/Support/steam/app.vdf.j2 new file mode 100644 index 0000000000..30feefa970 --- /dev/null +++ b/Support/steam/app.vdf.j2 @@ -0,0 +1,14 @@ +"appbuild" +{ + "appid" "{{ OPEN_BRUSH_APP_ID }}" + "Desc" "{{ VERSION }}" + "buildoutput" "../build_output/{{ CHANNEL }}" // Path for steamcmd logs + "contentroot" "." // This file will be copied into the root of the release + "setlive" "{{ CHANNEL }}" + "preview" "0" // For local testing, set this to 1 + "local" "" // Not relevant; this is for a custom CDN + "depots" + { + "{{ OPEN_BRUSH_WINDOWS_DEPOT_ID }}" main_depot.vdf + } +} diff --git a/Support/steam/app_template.vdf b/Support/steam/app_template.vdf.unused similarity index 100% rename from Support/steam/app_template.vdf rename to Support/steam/app_template.vdf.unused diff --git a/Support/steam/installscript_win.vdf b/Support/steam/installscript_win.vdf index 2740035511..4e4cf09ed7 100644 --- a/Support/steam/installscript_win.vdf +++ b/Support/steam/installscript_win.vdf @@ -2,27 +2,27 @@ InstallScript { Registry { "HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\.tilt" { string { - "(Default)" "Google.TiltBrush.File" + "(Default)" "Icosa.OpenBrush.File" } } - "HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Google.TiltBrush.File" { + "HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Icosa.OpenBrush.File" { string { - "(Default)" "Tilt Brush sketch file" + "(Default)" "Open Brush sketch file" } } - "HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Google.TiltBrush.File\\DefaultIcon" { + "HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Icosa.OpenBrush.File\\DefaultIcon" { string { - "(Default)" "%INSTALLDIR%\\TiltBrush.exe" + "(Default)" "%INSTALLDIR%\\OpenBrush.exe" } } - "HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Google.TiltBrush.File\\Shell\\Open\\Command" { + "HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Icosa.OpenBrush.File\\Shell\\Open\\Command" { string { - "(Default)" "%WINDIR%\\System32\\WindowsPowershell\\v1.0\\powershell -windowstyle hidden -c \"try { $s=[uri]::EscapeDataString('%1'); (new-object System.Net.WebClient).DownloadString('http://localhost:40074/load?'+$s) } catch { & '%INSTALLDIR%\\TiltBrush.exe' '%1' }\"" + "(Default)" "%WINDIR%\\System32\\WindowsPowershell\\v1.0\\powershell -windowstyle hidden -c \"try { $s=[uri]::EscapeDataString('%1'); (new-object System.Net.WebClient).DownloadString('http://localhost:40074/load?'+$s) } catch { & '%INSTALLDIR%\\OpenBrush.exe' '%1' }\"" } } "HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\tiltbrush" { string { - "(Default)" "URL:Tilt Brush" + "(Default)" "URL:Open Brush" } string { "URL Protocol" "" @@ -30,17 +30,17 @@ InstallScript { } "HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\tiltbrush\\DefaultIcon" { string { - "(Default)" "%INSTALLDIR%\\TiltBrush.exe" + "(Default)" "%INSTALLDIR%\\OpenBrush.exe" } } "HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\tiltbrush\\Shell\\Open\\Command" { string { - "(Default)" "%WINDIR%\\System32\\WindowsPowershell\\v1.0\\powershell -windowstyle hidden -c \"try { $s=[uri]::EscapeDataString('%1'); (new-object System.Net.WebClient).DownloadString('http://localhost:40074/load?'+$s) } catch { & '%INSTALLDIR%\\TiltBrush.exe' '%1' }\"" + "(Default)" "%WINDIR%\\System32\\WindowsPowershell\\v1.0\\powershell -windowstyle hidden -c \"try { $s=[uri]::EscapeDataString('%1'); (new-object System.Net.WebClient).DownloadString('http://localhost:40074/load?'+$s) } catch { & '%INSTALLDIR%\\OpenBrush.exe' '%1' }\"" } } } Firewall { - "Tilt Brush" "%INSTALLDIR%\\TiltBrush.exe" + "Open Brush" "%INSTALLDIR%\\OpenBrush.exe" } } diff --git a/Support/steam/main_depot.vdf.j2 b/Support/steam/main_depot.vdf.j2 new file mode 100644 index 0000000000..6561a9ef08 --- /dev/null +++ b/Support/steam/main_depot.vdf.j2 @@ -0,0 +1,32 @@ +"DepotBuildConfig" +{ + // # Set your assigned depot ID here + "DepotID" "{{ OPEN_BRUSH_WINDOWS_DEPOT_ID }}" + + "ContentRoot" "StandaloneWindows64-SteamVR" + + "FileMapping" + { + // Include all files in the build output directory (ContentRoot) + "LocalPath" "*" + + // Destination is the main install directory + "DepotPath" "." + + // If LocalPath contains wildcards, setting this means that all + // matching files within subdirectories of LocalPath will also + // be included. + "recursive" "1" + } + + // Install scripts + "FileMapping" { + "LocalPath" "../installscript_win.vdf" + "DepotPath" "." + } + "InstallScript" "../installscript_win.vdf" + + // but exclude all symbol files + "FileExclusion" "*.pdb" + "FileExclusion" "build_log.txt" +} diff --git a/Support/steam/main_depot_template.vdf b/Support/steam/main_depot_template.vdf.unused similarity index 100% rename from Support/steam/main_depot_template.vdf rename to Support/steam/main_depot_template.vdf.unused