-
-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish releases (and prereleases) to Steam (#182)
Because Steam does not let us push releases to the main release channel ("Default"), all releases will go to the prerelease channel. Upon closing a formal version, it should be updated manually in Steam at https://partner.steamgames.com/apps/builds/1634870 To set this up, first, create a new user for Steam with limited permissions. See https://partner.steamgames.com/doc/sdk/uploading#Build_Account for details. Note that multiple users can be created with the same email address. Do NOT connect this user to the mobile steam guard; it should only use email based OTPs. After the user is created, create two github secrets: STEAM_USERNAME and STEAM_PASSWORD. Then, download steamcmd locally, and run: steamcmd +login $STEAM_USERNAME $STEAM_PASSWORD +quit It will prompt you for a code; check the email associated with the account and enter the one time password. After that, three more secrets need to be created. Check the steam directory (~/Library/Application Support/Steam on Mac, I don't know for other platforms), and run: base64 -i config/config.vdf Store this as STEAM_CONFIG_VDK Then find the file in that directory named ssfnXXXXXX. Save the file name to STEAM_SSFN_FILENAME, and the contents (using base64 -i) to STEAM_SSFN Then the builds will work!
- Loading branch information
Showing
6 changed files
with
127 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
- 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] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
File renamed without changes.