File tree Expand file tree Collapse file tree 2 files changed +28
-6
lines changed
Expand file tree Collapse file tree 2 files changed +28
-6
lines changed Original file line number Diff line number Diff line change 1919 steps :
2020 - uses : actions/checkout@v4
2121 with :
22- fetch-depth : 0
23- lfs : true
22+ sparse-checkout : |
23+ ProjectSettings/ProjectVersion.txt
2424
2525 - name : Set unity version
2626 id : set_unity_version
7676 steps :
7777 - uses : actions/checkout@v4
7878 with :
79- fetch-depth : 0
8079 lfs : true
8180
8281 # Avoid running into space issues for github runners - Docker images can take up quite some space
@@ -166,9 +165,6 @@ jobs:
166165 if : ${{ github.repository_owner == 'JohannesDeml' }}
167166 runs-on : ubuntu-latest
168167 steps :
169- - name : Checkout code
170- uses : actions/checkout@v4
171-
172168 - uses : actions/download-artifact@v4
173169 with :
174170 name : ${{ needs.variables.outputs.BUILD_NAME }}
Original file line number Diff line number Diff line change @@ -384,6 +384,32 @@ private static void ReportSummary(BuildSummary summary)
384384 {
385385 LogError ( summaryText ) ;
386386 }
387+
388+ // Archive the build report to metadata folder
389+ ArchiveBuildReport ( summary . outputPath ) ;
390+ }
391+
392+ private static void ArchiveBuildReport ( string buildOutputPath )
393+ {
394+ try
395+ {
396+ string buildReportPath = "Library/LastBuild.buildreport" ;
397+ if ( ! File . Exists ( buildReportPath ) )
398+ {
399+ LogWarning ( $ "Build report not found at { buildReportPath } ") ;
400+ return ;
401+ }
402+
403+ string destinationFolder = Path . Combine ( buildOutputPath , "metadata" ) ;
404+ Directory . CreateDirectory ( destinationFolder ) ;
405+ string destinationPath = Path . Combine ( destinationFolder , "LastBuild.buildreport" ) ;
406+ File . Copy ( buildReportPath , destinationPath , true ) ;
407+ Log ( $ "Build report archived to: { destinationPath } ") ;
408+ }
409+ catch ( Exception ex )
410+ {
411+ LogWarning ( $ "Failed to archive build report: { ex . Message } ") ;
412+ }
387413 }
388414
389415 private static void ExitWithResult ( BuildResult result )
You can’t perform that action at this time.
0 commit comments