@@ -483,3 +483,59 @@ jobs:
483
483
target_commitish : ${{ needs.configuration.outputs.currentrelease }}
484
484
tag_name : ${{ needs.configuration.outputs.version }}
485
485
files : releases/*
486
+
487
+ publish_steam :
488
+ name : Publish Steam Release
489
+ needs : [build]
490
+ if : |
491
+ github.event_name == 'push' &&
492
+ github.repository == 'icosa-foundation/open-brush' &&
493
+ (github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags/v'))
494
+ runs-on : ubuntu-latest
495
+ steps :
496
+ - name : Checkout repository
497
+ uses : actions/checkout@v4
498
+ with :
499
+ fetch-depth : 0
500
+ sparse-checkout : |
501
+ Support/steam
502
+ lfs : true # We don't use LFS, but it adds no time, and leave it here in case we do at some point later
503
+ - name : Setup steamcmd
504
+ uses :
CyberAndrii/[email protected]
505
+ - name : Restore steam login config
506
+ run : |
507
+ mkdir -p /home/runner/Steam/config
508
+ echo "${{ secrets.STEAM_CONFIG_VDF}}" | base64 -d - > /home/runner/Steam/config/config.vdf
509
+ md5sum /home/runner/Steam/config/config.vdf
510
+ - name : Download Build Artifacts (Windows)
511
+ uses : actions/download-artifact@v4
512
+ with :
513
+ name : Windows
514
+ path : build_windows
515
+ - name : Upload Build
516
+ run : |
517
+ pip install -U jinjanator
518
+ jinjanate Support/steam/app.vdf.j2 > app.vdf
519
+ jinjanate Support/steam/main_depot.win.vdf.j2 > build_windows/main_depot.vdf
520
+ #jinjanate Support/steam/installscript_win.vdf.j2 > build_windows_openxr/installscript_win.vdf
521
+ steamcmd +login $STEAM_USERNAME +run_app_build $(pwd)/app.vdf +quit
522
+ env :
523
+ STEAM_USERNAME : ${{ vars.STEAM_USERNAME }}
524
+ STEAM_PASSWORD : ${{ secrets.STEAM_PASSWORD }}
525
+ VERSION : ${{ needs.configuration.outputs.version }}
526
+ OPEN_BLOCKS_APP_ID : ${{ vars.STEAM_APP_ID }}
527
+ OPEN_BLOCKS_WINDOWS_DEPOT_ID : ${{ vars.STEAM_WINDOWS_DEPOT_ID }}
528
+ OPEN_BLOCKS_WINDOWS_EXECUTABLE : ${{ needs.configuration.outputs.basename}}.exe
529
+ CHANNEL : beta
530
+ - name : Update steam login secret
531
+ run : |
532
+ base64 -i /home/runner/Steam/config/config.vdf | gh secret set --org icosa-foundation STEAM_CONFIG_VDF
533
+ md5sum /home/runner/Steam/config/config.vdf
534
+ env :
535
+ GITHUB_TOKEN : ${{ secrets.SECRET_UPDATER_PAT }}
536
+ - name : Save logs
537
+ uses : actions/upload-artifact@v4
538
+ if : ${{ failure() }}
539
+ with :
540
+ name : steamcmd logs
541
+ path : build_output/
0 commit comments