-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish.bat
40 lines (30 loc) · 1023 Bytes
/
publish.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
@echo off
where dotnet 2>nul
if %ERRORLEVEL% gtr 0 (
echo .NET SDK not installed. Exiting...
exit /b
)
if exist "bin\release\net8.0" (
rd "bin\release\net8.0" /s /q
)
cls
echo Publishing self-contained binaries...
:: Publish self-contained versions
dotnet publish -r:win-x86 --sc -o "bin\release\net8.0\sc\win-x86"
dotnet publish -r:win-x64 --sc -o "bin\release\net8.0\sc\win-x64"
dotnet publish -r:win-arm64 --sc -o "bin\release\net8.0\sc\win-arm64"
if exist "bin\release\net8.0\sc" (
echo Zipping self-contained binaries...
powershell -ExecutionPolicy Bypass ".\SelfContainedZip.ps1"
rd "bin\release\net8.0\sc" /s /q
)
echo Publishing regular binaries...
:: Publish release for x86, amd64 and arm64
dotnet publish -r:win-x86
rd "bin\release\net8.0\win-x86\publish" /s /q
dotnet publish -r:win-x64
rd "bin\release\net8.0\win-x64\publish" /s /q
dotnet publish -r:win-arm64
rd "bin\release\net8.0\win-arm64\publish" /s /q
echo Zipping regular binaries...
powershell -ExecutionPolicy Bypass ".\RegularZip.ps1"