Compare commits

...

7 Commits

7 changed files with 320 additions and 0 deletions

2
.gitattributes vendored
View File

@@ -10,3 +10,5 @@
*.wav filter=lfs diff=lfs merge=lfs -text *.wav filter=lfs diff=lfs merge=lfs -text
*.xcf filter=lfs diff=lfs merge=lfs -text *.xcf filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text *.jpg filter=lfs diff=lfs merge=lfs -text
* text=auto

View File

@@ -0,0 +1,58 @@
name: Build Unreal Engine Project
description: Build, cook, and package an Unreal Engine project
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: bash
run: |
echo "project_name=$(basename "${{ inputs.project_file }}" .uproject)" >> "$GITHUB_OUTPUT"
- name: Build Editor (if not Shipping)
if: ${{ inputs.configuration != 'Shipping' }}
shell: bash
run: |
"${{ inputs.ue_path }}/Engine/Build/BatchFiles/Build.sh" \
"${{ steps.extract.outputs.project_name }}Editor" \
"${{ inputs.platform }}" \
"${{ inputs.configuration }}" \
-project="${{ inputs.project_file }}" \
-waitmutex \
-targetplatform=${{ inputs.platform }}
- name: Build Game
shell: bash
run: |
"${{ inputs.ue_path }}/Engine/Build/BatchFiles/Build.sh" \
"${{ steps.extract.outputs.project_name }}" \
"${{ inputs.platform }}" \
"${{ inputs.configuration }}" \
-project="${{ inputs.project_file }}" \
-waitmutex \
-targetplatform=${{ inputs.platform }}
- name: Cook and Package
shell: bash
run: |
"${{ inputs.ue_path }}/Engine/Build/BatchFiles/RunUAT.sh" BuildCookRun \
-project="${{ inputs.project_file }}" \
-noP4 \
-platform=${{ inputs.platform }} \
-clientconfig=${{ inputs.configuration }} \
-serverconfig=${{ inputs.configuration }} \
-nocompileeditor -cook -pak -stage -archive \
-archivedirectory="${{ inputs.output }}"

View File

@@ -0,0 +1,59 @@
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 }}"

View File

@@ -0,0 +1,63 @@
name: release-linux
on:
push:
branches:
- dev
- main
tags:
- '*'
jobs:
build-and-release-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set build config
id: config
run: |
echo "PLATFORM=Linux" >> $GITHUB_ENV
echo "CONFIGURATION=Shipping" >> $GITHUB_ENV
echo "PROJECT_FILE=MyProject/MyProject.uproject" >> $GITHUB_ENV
echo "OUTPUT_DIR=${{ github.workspace }}/output" >> $GITHUB_ENV
echo "UE_PATH=/path/to/UnrealEngine" >> $GITHUB_ENV
- name: Build Unreal Project (Linux)
uses: ./.gitea/actions/build-ue-project-unix
with:
platform: ${{ env.PLATFORM }}
ue_path: ${{ env.UE_PATH }}
project_file: ${{ env.PROJECT_FILE }}
configuration: ${{ env.CONFIGURATION }}
output: ${{ env.OUTPUT_DIR }}
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: ue-build-linux-${{ github.ref_name }}
path: ${{ env.OUTPUT_DIR }}
- name: Create Release on Tag
if: startsWith(github.ref, 'refs/tags/')
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: "Unreal Build Linux ${{ github.ref_name }}"
body: "Automatically built from tag ${{ github.ref_name }}."
draft: false
prerelease: false
- name: Upload Release Asset (Linux)
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ${{ env.OUTPUT_DIR }}
asset_name: ue-package-linux-${{ github.ref_name }}.zip
asset_content_type: application/zip

View File

@@ -0,0 +1,63 @@
name: release-mac
on:
push:
branches:
- dev
- main
tags:
- '*'
jobs:
build-and-release-mac:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set build config
id: config
run: |
echo "PLATFORM=Mac" >> $GITHUB_ENV
echo "CONFIGURATION=Shipping" >> $GITHUB_ENV
echo "PROJECT_FILE=MyProject/MyProject.uproject" >> $GITHUB_ENV
echo "OUTPUT_DIR=${{ github.workspace }}/output" >> $GITHUB_ENV
echo "UE_PATH=/path/to/UnrealEngine" >> $GITHUB_ENV
- name: Build Unreal Project (Mac)
uses: ./.gitea/actions/build-ue-project-unix
with:
platform: ${{ env.PLATFORM }}
ue_path: ${{ env.UE_PATH }}
project_file: ${{ env.PROJECT_FILE }}
configuration: ${{ env.CONFIGURATION }}
output: ${{ env.OUTPUT_DIR }}
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: ue-build-mac-${{ github.ref_name }}
path: ${{ env.OUTPUT_DIR }}
- name: Create Release on Tag
if: startsWith(github.ref, 'refs/tags/')
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: "Unreal Build Mac ${{ github.ref_name }}"
body: "Automatically built from tag ${{ github.ref_name }}."
draft: false
prerelease: false
- name: Upload Release Asset (Mac)
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ${{ env.OUTPUT_DIR }}
asset_name: ue-package-mac-${{ github.ref_name }}.zip
asset_content_type: application/zip

View File

@@ -0,0 +1,63 @@
name: release-windows
on:
push:
branches:
- dev
- main
tags:
- '*'
jobs:
build-and-release-win:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set build config
id: config
run: |
echo "PLATFORM=Win64" >> $env:GITHUB_ENV
echo "CONFIGURATION=Shipping" >> $env:GITHUB_ENV
echo "PROJECT_FILE=MyProject\MyProject.uproject" >> $env:GITHUB_ENV
echo "OUTPUT_DIR=${{ github.workspace }}\output" >> $env:GITHUB_ENV
echo "UE_PATH=C:\\Path\\To\\UnrealEngine" >> $env:GITHUB_ENV
- name: Build Unreal Project (Windows)
uses: ./.gitea/actions/build-ue-project-win
with:
platform: ${{ env.PLATFORM }}
ue_path: ${{ env.UE_PATH }}
project_file: ${{ env.PROJECT_FILE }}
configuration: ${{ env.CONFIGURATION }}
output: ${{ env.OUTPUT_DIR }}
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: ue-build-win-${{ github.ref_name }}
path: ${{ env.OUTPUT_DIR }}
- name: Create Release on Tag
if: startsWith(github.ref, 'refs/tags/')
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: "Unreal Build Windows ${{ github.ref_name }}"
body: "Automatically built from tag ${{ github.ref_name }}."
draft: false
prerelease: false
- name: Upload Release Asset (Windows)
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ${{ env.OUTPUT_DIR }}
asset_name: ue-package-win-${{ github.ref_name }}.zip
asset_content_type: application/zip

12
Cmd/compile_plugin.md Normal file
View File

@@ -0,0 +1,12 @@
```sh
./RunUAT.sh BuildPlugin -Plugin="/path/to/MyPlugin.uplugin" -Package="/path/to/build_dir" -TargetPlatforms=Linux
```
/!\ the directory `build_dir` will be erased
Enable the plugin by default by adding to the .uplugin
```json
"EnabledByDefault": true,
```