Author SHA1 Message Date
mrhid6 7892b3a4bf ci: More workflow fixes
Mod Build / Details (push) Successful in 3s
Mod Build / Build (push) Successful in 9m2s
Mod Build / SMRDeploy (push) Successful in 30s
2026-08-14 09:43:28 +00:00
mrhid6 73f9861e0b ci: Fixed workflow run loop
Mod Build / Details (push) Successful in 4s
Mod Build / Build (push) Successful in 7m52s
Mod Build / SMRDeploy (push) Successful in 39s
2026-08-14 09:16:59 +00:00
mrhid6 9aa0f23a8e ci: Updated workflow for change log
Mod Build / Build (push) Successful in 12m51s
Mod Build / Details (push) Successful in 4s
Mod Build / SMRDeploy (push) Skipped
2026-08-14 08:58:21 +00:00
mrhid6 6063217343 fix: Fixes to Data asset system
Mod Build / Details (push) Successful in 3s
Mod Build / Build (push) Successful in 18m34s
Mod Build / SMRDeploy (push) Has been skipped
2026-07-12 19:16:23 +01:00
mrhid6 0614aa6526 fix: Fixed CTD with data assets
Mod Build / Build (push) Successful in 6m29s
Mod Build / Details (push) Successful in 3s
Mod Build / SMRDeploy (push) Successful in 1m36s
2026-07-04 21:24:59 +01:00
3 changed files with 116 additions and 10 deletions
+105 -3
View File
@@ -1,5 +1,9 @@
name: Mod Build
on: push
on:
push:
branches:
- "**"
workflow_dispatch:
env:
MOD_NAME: "RefinedRDApi"
MOD_ID: "7q2RnptXynYzEX"
@@ -13,6 +17,7 @@ env:
jobs:
Details:
if: ${{ !startsWith(gitea.ref, 'refs/tags/') }}
runs-on: ubuntu-docker
steps:
- run: |
@@ -24,15 +29,17 @@ jobs:
echo "Engine Directory: ${{env.ENGINE_DIR}}"
echo "Built Mods Directory: ${{env.BUILT_MODS_DIR}}"
echo "Dev Build Directory: ${{env.DEV_BUILDS_DIR}}"
echo "Change Log: ${{vars.CHANGELOG}}"
echo "Change Log: auto-generated from commits since last release/* tag"
Build:
if: ${{ !startsWith(gitea.ref, 'refs/tags/') }}
runs-on: windows-ue
defaults:
run:
shell: pwsh
outputs:
version: ${{steps.version.outputs.version}}
changelog_b64: ${{steps.changelog.outputs.changelog_b64}}
steps:
- name: Compute Version
id: version
@@ -108,6 +115,79 @@ jobs:
git reset --hard "origin/$ref"
}
echo "Pulled ${{env.MOD_NAME}} @ latest (${{gitea.ref_name}})"
- name: Generate Changelog
id: changelog
run: |
$modPath = "${{env.SML_DIR}}/Mods/${{env.MOD_NAME}}"
if ("${{env.IS_GAME_FEATURE_PLUGIN}}" -eq "true") {
$modPath = "${{env.SML_DIR}}/Mods/GameFeatures/${{env.MOD_NAME}}"
}
# Last commit that was actually released to SMR is marked by a release/* tag
# pushed by the SMRDeploy job. No manual tagging, no manual changelog.
$prevTag = (git -C $modPath describe --tags --abbrev=0 --match "release/*" HEAD 2>$null)
if ($LASTEXITCODE -ne 0 -or [string]::IsNullOrWhiteSpace($prevTag)) {
$prevTag = $null
$range = "HEAD"
echo "No previous release/* tag found - using full history"
} else {
$range = "$prevTag..HEAD"
echo "Previous release tag: $prevTag"
}
$subjects = @(git -C $modPath log --no-merges --pretty=format:%s $range) |
Where-Object { -not [string]::IsNullOrWhiteSpace($_) }
$groups = [ordered]@{
"Features" = @()
"Fixes" = @()
"Performance" = @()
"Changes" = @()
"Other" = @()
}
# Commit types that are noise for players - never shown
$skip = @("chore", "ci", "docs", "test", "tests", "style", "build")
foreach ($subject in $subjects) {
if ($subject -match '^(?<type>[a-zA-Z]+)(\([^)]*\))?!?:\s*(?<desc>.+)$') {
$type = $matches.type.ToLower()
$desc = $matches.desc.Trim()
if ($skip -contains $type) { continue }
switch ($type) {
"feat" { $groups["Features"] += $desc }
"fix" { $groups["Fixes"] += $desc }
"perf" { $groups["Performance"] += $desc }
"refactor" { $groups["Changes"] += $desc }
default { $groups["Other"] += $desc }
}
} else {
$groups["Other"] += $subject.Trim()
}
}
$lines = @()
foreach ($name in $groups.Keys) {
$items = $groups[$name] | Select-Object -Unique
if ($items.Count -eq 0) { continue }
$lines += "### $name"
foreach ($item in $items) { $lines += "- $item" }
$lines += ""
}
if ($lines.Count -eq 0) {
$lines = @("### Changes", "- Maintenance release")
}
$header = @("# Change Log - v${{steps.version.outputs.version}}", "")
$changelog = (($header + $lines) -join "`n").Trim()
echo "----- Changelog -----"
echo $changelog
echo "---------------------"
# base64 so the multiline markdown survives job outputs intact
$b64 = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($changelog))
Write-Output "changelog_b64=$b64" >> $Env:GITHUB_OUTPUT
- name: Update UPlugin Versions
run: |
@@ -213,9 +293,13 @@ jobs:
path: ${{env.BUILT_MODS_DIR}}
- name: Deploy to SMR
id: deploy
run: |
echo "Deploying to SMR"
$Version = "${{needs.Build.outputs.version}}"
$Changelog = [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String("${{needs.Build.outputs.changelog_b64}}"))
echo "Changelog:"
echo $Changelog
$query = '{ "query": "query { getModByReference(modReference:\"${{env.MOD_NAME}}\"){ versions(filter:{limit: 1}){ version } }}"}'
$SMRVersion = (Invoke-RestMethod `
-Method POST `
@@ -232,5 +316,23 @@ jobs:
& "S:/ficsit_windows_amd64.exe" smr upload `
--api-base "$APIURL" `
--api-key "${{secrets.FICSIT_TOKEN}}" `
"${{env.MOD_ID}}" "$File" "${{vars.CHANGELOG}}"
"${{env.MOD_ID}}" "$File" "$Changelog"
if ($LASTEXITCODE -ne 0) {
Write-Error "SMR upload failed"
exit 1
}
Write-Output "uploaded=true" >> $Env:GITHUB_OUTPUT
echo "Done"
- name: Tag Released Commit
if: ${{ steps.deploy.outputs.uploaded == 'true' }}
run: |
$Version = "${{needs.Build.outputs.version}}"
$modPath = "${{env.SML_DIR}}/Mods/${{env.MOD_NAME}}"
if ("${{env.IS_GAME_FEATURE_PLUGIN}}" -eq "true") {
$modPath = "${{env.SML_DIR}}/Mods/GameFeatures/${{env.MOD_NAME}}"
}
# This tag is the marker the next build's changelog starts from
git -C $modPath tag -f "release/$Version"
git -C $modPath push -f origin "release/$Version"
echo "Tagged release/$Version @ $(git -C $modPath rev-parse HEAD)"
+3 -3
View File
@@ -1,8 +1,8 @@
{
"FileVersion": 3,
"Version": 1,
"VersionName": "1.0.7",
"SemVersion": "1.0.7",
"Version": 2026,
"VersionName": "2026.3.2",
"SemVersion": "2026.3.2",
"FriendlyName": "Refined R&D Api",
"Description": "This Lib can be used to create Mod Compatability with Refined R&D Mods",
"Category": "Modding",
@@ -408,7 +408,8 @@ TArray<URRDATurbineDataAsset*> URRDADataAssetSubsystem::GetAllTurbineAssets(int3
}
URRDATurbineDataAsset* URRDADataAssetSubsystem::GetDefaultTurbineAsset(int32 Tier) const {
return GetAllTurbineAssets(Tier).Top();
TArray<URRDATurbineDataAsset*> Assets = GetAllTurbineAssets(Tier);
return Assets.Num() > 0 ? Assets.Top() : nullptr;
}
URRDATurbineDataAsset* URRDADataAssetSubsystem::GetTurbineItemData(TSubclassOf<UFGItemDescriptor> Item, int32 Tier) const {
@@ -435,7 +436,8 @@ URRDACoolerDataAsset* URRDADataAssetSubsystem::GetCoolerItemData(TSubclassOf<UFG
}
URRDACoolerDataAsset* URRDADataAssetSubsystem::GetDefaultCoolerAsset(ERRDACoolerType Type) const {
return GetAllCoolerAssets(Type).Top();
TArray<URRDACoolerDataAsset*> Assets = GetAllCoolerAssets(Type);
return Assets.Num() > 0 ? Assets.Top() : nullptr;
}
TArray<URRDACoolerDataAsset*> URRDADataAssetSubsystem::GetAllCoolerAssets(ERRDACoolerType Type) const {
@@ -481,7 +483,8 @@ bool URRDADataAssetSubsystem::GetAllBoilerRelevantItems(TArray<TSubclassOf<UFGIt
}
URRDABoilerDataAsset* URRDADataAssetSubsystem::GetDefaultBoilerAsset(int32 Tier) const {
return GetAllBoilerAssets(Tier).Top();
TArray<URRDABoilerDataAsset*> Assets = GetAllBoilerAssets(Tier);
return Assets.Num() > 0 ? Assets.Top() : nullptr;
}
TArray<URRDABoilerDataAsset*> URRDADataAssetSubsystem::GetAllBoilerAssets(int32 Tier) const {
@@ -522,7 +525,8 @@ bool URRDADataAssetSubsystem::GetAllHeaterRelevantItems(TArray<TSubclassOf<UFGIt
}
URRDAHeaterDataAsset* URRDADataAssetSubsystem::GetDefaultHeaterAsset(ERRDAHeaterType Type) const {
return GetAllHeaterAssets(Type).Top();
TArray<URRDAHeaterDataAsset*> Assets = GetAllHeaterAssets(Type);
return Assets.Num() > 0 ? Assets.Top() : nullptr;
}
TArray<URRDAHeaterDataAsset*> URRDADataAssetSubsystem::GetAllHeaterAssets(ERRDAHeaterType Type) const {