Skip to content

Instantly share code, notes, and snippets.

View douglaslassance's full-sized avatar

Douglas Lassance douglaslassance

View GitHub Profile
name: Publish
on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'Engine/**'
- 'Game/**'
- 'PackageGame.bat'
- 'DeployGame.bat'
// https://partner.steamgames.com/doc/sdk/uploading
"AppBuild"
{
"AppID" "<app_id>"
// "Desc" ""
"ContentRoot" "Dist\WindowsNoEditor"
"BuildOutput" "Steam"
"SetLive" "main"
"Depots"
{
@echo off
pushd "%~dp0"
rem Command generated using the editor's project launcher. See https://docs.unrealengine.com/en-US/SharingAndReleasing/Deployment/ProjectLauncher
rem For arguments documentation see https://github.com/botman99/ue4-unreal-automation-tool.
rem Use `-nocompileeditor` for forcing the editor not to compile.
.\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun -project=%~dp0<project_name>\<project_name>.uproject -nop4 -clientconfig=Development -serverconfig=Development -unrealexe=%~dp0Engine\Binaries\Win64\UnrealEditor-Cmd.exe -utf8output -platform=Win64 -targetplatform=Win64 -build -cook -map=Splash.umap+Map.umap+Forest.umap -cookdir=%~dp0\<project_name>\Content\Stage\Prints\Abilities+%~dp0\<project_name>\Content\Stage\Animations -skipcookingeditorcontent -unversionedcookedcontent -pak -distribution -compressed -stage -package -stagingdirectory="%~dp0Dist"
popd
@echo off
pushd "%~dp0"
rem Initializing submodules
git submodule update --init --recursive
rem Installing LFS.
rem A manual install result in not copying the LFS hooks that we already have.
git lfs install --manual
if %errorlevel% neq 0 exit /b %errorlevel%
name: Publish on Steam
on:
push:
branches: [ main ]
paths:
- 'Engine/**'
- 'Game/**'
- 'PackageGame.bat'
- 'PublishGame.bat'
name: Generate installed build
on:
push:
branches: [ main ]
jobs:
build-and-upload:
name: Generate installed build
runs-on: windows-latest
@echo off
pushd "%~dp0"
for /F "delims=" %%L in ('git rev-parse HEAD') do (set "UNREAL_ENGINE_COMMIT=%%L")
rclone config create spaces s3 env_auth false access_key_id %SPACES_ACCESS_KEY% secret_access_key %SPACES_SECRET% endpoint %SPACES_ENDPOINT% acl private
rclone sync ../LocalBuilds/Engine spaces:/playsthetic/unreal-engine/%UNREAL_ENGINE_COMMIT%/Win64 --progress --exclude *.pdb
rem
popd
@echo off
pushd "%~dp0"
.\Build\BatchFiles\RunUAT.bat BuildGraph -target="Make Installed Build Win64" -script="%~dp0Build\InstalledEngineBuild.xml" -set:CompileDatasmithPlugins=false -set:HostPlatformOnly=true -set:GameConfigurations=Development -set:WithDDC=false
popd
@echo off
pushd "%~dp0"
rem Engine/Documentation is not ignore because the content is needed by GenerateInstalledBuild.bat to work.
.\Binaries\DotNET\GitDependencies.exe --no-cache --exclude=Samples --exclude=Templates --exclude=FeaturePacks --exclude=Engine/Saved --exclude=Win32 --exclude=win32 --exclude=Mac --exclude=osx64 --exclude=osx32 --exclude=Linux --exclude=linux --exclude=Linux32 --exclude=linux32 --exclude=Linux64 --exclude=linux64 --exclude=linux_x64 --exclude=Android --exclude=android --exclude=HoloLens --exclude=Win32 --exclude=WinRT --exclude=winrt --exclude=HTML5 --exclude=html5 --exclude=XboxOne --exclude=Switch --exclude=Dingo --exclude=PS4 --exclude=Python
if %errorlevel% neq 0 exit /b %errorlevel%
rem We do not use templates but the .ini file needs to exist for GenerateInstalledBuild.bat to work.
mkdir ../Templates
copy ../Templates/TemplateCategories.ini
@echo off
pushd "%~dp0"
rem Setting up repository.
git submodule update --init --recursive
git config core.hooksPath .hooks
rem Doing those globally so they affect submodules.
git config --global pull.rebase true
git config --global rebase.autoStash true