@@ -57,26 +57,33 @@ $excludes = @(
57
57
' tmp'
58
58
' temp'
59
59
' tools/external'
60
+ ' tools/bindings-generator/clang/prebuilt'
60
61
' axmol-*.zip'
61
62
' out'
62
63
' */_x/*'
63
64
)
64
65
65
66
$pkg_file_name = " axmol-$version .zip"
66
67
$pkg_file_path = $ (Join-Path $AX_ROOT $pkg_file_name )
67
-
68
- Write-Host " Creating package $pkg_file_path ..."
69
-
70
- $compress_args = @ {
68
+ $main_pkg_compress_args = @ {
71
69
Path = $AX_ROOT
72
- CompressionLevel = ' Optimal '
70
+ CompressionLevel = ' SmallestSize '
73
71
DestinationPath = $pkg_file_path
74
72
RelativeBasePath = $AX_ROOT
75
73
Exclude = $excludes
76
74
Prefix = " axmol-$version "
77
75
}
78
76
79
- # Compress-Archive @compress -PassThru
77
+ $bs_pkg_file_name = " axmol-bs-$version .zip"
78
+ $bs_pkg_file_path = $ (Join-Path $AX_ROOT $bs_pkg_file_name )
79
+ $bs_pkg_compress_args = @ {
80
+ Path = @ (" $AX_ROOT /1k" , " $AX_ROOT /setup.ps1" , " $AX_ROOT /core/axmolver.h.in" , " $AX_ROOT /tools/cmdline" )
81
+ CompressionLevel = ' Optimal'
82
+ DestinationPath = $bs_pkg_file_path
83
+ RelativeBasePath = $AX_ROOT
84
+ Exclude = $excludes
85
+ Prefix = " axmol-bs-$version "
86
+ }
80
87
81
88
function Compress-ArchiveEx () {
82
89
param (
@@ -224,6 +231,7 @@ public class UnixFileStream : FileStream
224
231
' Optimal' = [System.IO.Compression.CompressionLevel ]::Optimal
225
232
' Fastest' = [System.IO.Compression.CompressionLevel ]::Fastest
226
233
' NoCompression' = [System.IO.Compression.CompressionLevel ]::NoCompression
234
+ ' SmallestSize' = [System.IO.Compression.CompressionLevel ]::SmallestSize
227
235
}[$CompressionLevel ]
228
236
229
237
[array ]$Excludes = $Exclude
@@ -341,21 +349,29 @@ else {
341
349
$release_note = Join-Path $AX_ROOT " release_note_draft.txt"
342
350
}
343
351
352
+ # save release note
344
353
New-Item - Path $release_note - ItemType File - Value $release_note_content - Force
345
354
346
- # Compress-Archive @compress_args
347
- $total = Compress-ArchiveEx @compress_args - Force
355
+ # create axmol build system package
356
+ Write-Host " Creating build system package $bs_pkg_file_path ..."
357
+ $total = Compress-ArchiveEx @bs_pkg_compress_args - Force
358
+ $bs_md5_digest = (Get-FileHash $bs_pkg_file_path - Algorithm MD5).Hash
359
+ Write-Host " Create build system package $bs_pkg_file_path done, ${total} files found, MD5: $bs_md5_digest "
348
360
361
+ # create main package
362
+ Write-Host " Creating main package $pkg_file_path ..."
363
+ $total = Compress-ArchiveEx @main_pkg_compress_args - Force
349
364
$md5_digest = (Get-FileHash $pkg_file_path - Algorithm MD5).Hash
350
-
351
- Write-Host " Create package $pkg_file_path done, ${total} files found, MD5: $md5_digest "
365
+ Write-Host " Create main package $pkg_file_path done, ${total} files found, MD5: $md5_digest "
352
366
353
367
Pop-Location
354
368
369
+ [System.IO.File ]::AppendAllText($release_note , " ## MD5 Hash of the release artifacts`n - `` ${pkg_file_name} `` : $md5_digest `n - `` ${bs_pkg_file_name} `` : $bs_md5_digest " )
370
+
355
371
if ($env: GITHUB_ACTIONS -eq ' true' ) {
356
- [System.IO.File ]::AppendAllText($release_note , " ## MD5 Hash of the release artifacts`n - `` ${pkg_file_name} `` : $md5_digest " )
357
372
echo " release_tag=v$version " >> ${env: GITHUB_OUTPUT}
358
373
echo " release_pkg=$pkg_file_name " >> ${env: GITHUB_OUTPUT}
374
+ echo " bs_release_pkg=$bs_pkg_file_name " >> ${env: GITHUB_OUTPUT}
359
375
echo " release_note=$release_note " >> ${env: GITHUB_OUTPUT}
360
376
echo " prerelease=$prerelease " >> ${env: GITHUB_OUTPUT}
361
377
}
0 commit comments