File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,10 +55,18 @@ jobs:
5555 run : |
5656 $portable = Get-Item "dist/WinGroup.exe"
5757 $setup = Get-Item "dist/WinGroup-Setup.exe"
58+ $maxPortableMb = 80
59+ $maxSetupMb = 60
5860 $portableMb = [Math]::Round($portable.Length / 1MB, 2)
5961 $setupMb = [Math]::Round($setup.Length / 1MB, 2)
6062 "Portable size: $portableMb MB"
6163 "Setup size: $setupMb MB"
64+ if ($portableMb -gt $maxPortableMb) {
65+ throw "WinGroup.exe is too large ($portableMb MB). Limit is $maxPortableMb MB."
66+ }
67+ if ($setupMb -gt $maxSetupMb) {
68+ throw "WinGroup-Setup.exe is too large ($setupMb MB). Limit is $maxSetupMb MB."
69+ }
6270 "### Release Artifact Sizes" >> $env:GITHUB_STEP_SUMMARY
6371 "- WinGroup.exe: $portableMb MB" >> $env:GITHUB_STEP_SUMMARY
6472 "- WinGroup-Setup.exe: $setupMb MB" >> $env:GITHUB_STEP_SUMMARY
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ run: icon
4040 dotnet run --project $(PROJECT )
4141
4242publish : icon restore
43- dotnet publish $(PROJECT ) -c $(CONFIG ) -r $(RID ) --self-contained false -p:PublishSingleFile=true -p:DebugType=None -p:DebugSymbols=false -p:Version=$(VERSION ) -p:InformationalVersion=$(INFO_VERSION ) -o $(OUT_DIR )
43+ dotnet publish $(PROJECT ) -c $(CONFIG ) -r $(RID ) --self-contained true -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:IncludeAllContentForSelfExtract =true -p:DebugType=None -p:DebugSymbols=false -p:Version=$(VERSION ) -p:InformationalVersion=$(INFO_VERSION ) -o $(OUT_DIR )
4444
4545portable : publish
4646 pwsh -NoProfile -Command " New-Item -ItemType Directory -Force -Path '$( DIST_DIR) ' | Out-Null; Copy-Item '$( OUT_DIR) /WinGroup.exe' '$( DIST_DIR) /$( PORTABLE_FILENAME) ' -Force"
You can’t perform that action at this time.
0 commit comments