Files
UnrealEngineProject/.gitea/actions/build-ue-project-win.yml

60 lines
1.8 KiB
YAML

name: Build Unreal Engine Project (Windows)
description: Build, cook, and package an Unreal project on Windows
inputs:
platform:
required: true
ue_path:
required: true
project_file:
required: true
configuration:
required: true
output:
required: true
runs:
using: "composite"
steps:
- name: Extract project name
id: extract
shell: pwsh
run: |
$name = [System.IO.Path]::GetFileNameWithoutExtension("${{ inputs.project_file }}")
echo "project_name=$name" >> $env:GITHUB_OUTPUT
- name: Build Editor (if not Shipping)
if: ${{ inputs.configuration != 'Shipping' }}
shell: cmd
run: |
"${{ inputs.ue_path }}\Engine\Build\BatchFiles\Build.bat" ^
${{ steps.extract.outputs.project_name }}Editor ^
${{ inputs.platform }} ^
${{ inputs.configuration }} ^
-project="${{ inputs.project_file }}" ^
-waitmutex ^
-targetplatform=${{ inputs.platform }}
- name: Build Game
shell: cmd
run: |
"${{ inputs.ue_path }}\Engine\Build\BatchFiles\Build.bat" ^
${{ steps.extract.outputs.project_name }} ^
${{ inputs.platform }} ^
${{ inputs.configuration }} ^
-project="${{ inputs.project_file }}" ^
-waitmutex ^
-targetplatform=${{ inputs.platform }}
- name: Cook and Package
shell: cmd
run: |
"${{ inputs.ue_path }}\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun ^
-project="${{ inputs.project_file }}" ^
-noP4 ^
-platform=${{ inputs.platform }} ^
-clientconfig=${{ inputs.configuration }} ^
-serverconfig=${{ inputs.configuration }} ^
-nocompileeditor -cook -pak -stage -archive ^
-archivedirectory="${{ inputs.output }}"