1313 - ' linux'
1414 - ' android'
1515 - ' all'
16- include_aot :
17- description : ' Include Windows AOT packaging'
16+ win64 :
17+ description : ' Windows x64'
18+ required : true
19+ default : true
20+ type : boolean
21+ win64_aot :
22+ description : ' Windows x64 AOT'
1823 required : true
1924 default : true
2025 type : boolean
@@ -31,34 +36,36 @@ jobs:
3136 run : mkdir upload
3237
3338 - name : Publish win-x64
34- run : dotnet publish demo/Ursa.Demo.Desktop -r win-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/win64
39+ if : ${{ github.event.inputs.win64 == 'true' }}
40+ run : dotnet publish demo/Ursa.Demo.Desktop -r win-x64 -c Release -o publish/win64 --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
3541
3642 - name : Zip win-x64
43+ if : ${{ github.event.inputs.win64 == 'true' }}
3744 run : |
38- $files = Get-ChildItem -Path ./ publish/win64/* -Recurse -Exclude *.pdb
39- Compress-Archive -Path $files.FullName -DestinationPath ./ upload/Ursa.Demo.Desktop.win-x64.zip
45+ $files = Get-ChildItem -Path publish/win64/* -Recurse -Exclude *.pdb
46+ Compress-Archive -Path $files.FullName -DestinationPath upload/Ursa.Demo.Desktop.win-x64.zip
4047
4148 - name : Enable Native AOT in .csproj
42- if : ${{ github.event.inputs.include_aot == 'true' }}
49+ if : ${{ github.event.inputs.win64_aot == 'true' }}
4350 run : |
4451 sed -i 's#<!--<PublishAot>true</PublishAot>-->#<PublishAot>true</PublishAot>#' demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj
4552 sed -i 's#<!--<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>-->#<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>#' demo/Ursa.Demo.Desktop/Ursa.Demo.Desktop.csproj
4653
4754 - name : Publish win-x64 AOT
48- if : ${{ github.event.inputs.include_aot == 'true' }}
49- run : dotnet publish demo/Ursa.Demo.Desktop -r win-x64 -c Release -o ./ publish/win64-aot
55+ if : ${{ github.event.inputs.win64_aot == 'true' }}
56+ run : dotnet publish demo/Ursa.Demo.Desktop -r win-x64 -c Release -o publish/win64-aot
5057
5158 - name : Zip win-x64 AOT
52- if : ${{ github.event.inputs.include_aot == 'true' }}
59+ if : ${{ github.event.inputs.win64_aot == 'true' }}
5360 run : |
54- $files = Get-ChildItem -Path ./ publish/win64-aot/* -Recurse -Exclude *.pdb
55- Compress-Archive -Path $files.FullName -DestinationPath ./ upload/Ursa.Demo.Desktop.win-x64.NativeAOT.zip
61+ $files = Get-ChildItem -Path publish/win64-aot/* -Recurse -Exclude *.pdb
62+ Compress-Archive -Path $files.FullName -DestinationPath upload/Ursa.Demo.Desktop.win-x64.NativeAOT.zip
5663
5764 - name : Upload a Build Artifact
5865 uses : actions/upload-artifact@v4.3.1
5966 with :
6067 name : windows
61- path : ./ upload
68+ path : upload
6269
6370 linux :
6471 if : ${{ github.event.inputs.platform == 'linux' || github.event.inputs.platform == 'all' }}
@@ -71,16 +78,16 @@ jobs:
7178 run : mkdir upload
7279
7380 - name : Publish linux-x64
74- run : dotnet publish demo/Ursa.Demo.Desktop -r linux-x64 -c Release -- sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/linux64
81+ run : dotnet publish demo/Ursa.Demo.Desktop -r linux-x64 -c Release -o publish/linux64 -- sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
7582
7683 - name : Zip linux-x64
77- run : zip -j -r ./ upload/Ursa.Demo.Desktop.linux-x64.zip ./ publish/linux64 -x "*.pdb"
84+ run : zip -j -r upload/Ursa.Demo.Desktop.linux-x64.zip publish/linux64 -x "*.pdb"
7885
7986 - name : Upload a Build Artifact
8087 uses : actions/upload-artifact@v4.3.1
8188 with :
8289 name : linux
83- path : ./ upload
90+ path : upload
8491
8592 android :
8693 if : ${{ github.event.inputs.platform == 'android' || github.event.inputs.platform == 'all' }}
@@ -90,16 +97,16 @@ jobs:
9097 uses : actions/checkout@v4.1.1
9198
9299 - name : CD Android
93- run : cd ./ demo/Ursa.Demo.Android
100+ run : cd demo/Ursa.Demo.Android
94101
95102 - name : Restore Dependencies
96103 run : dotnet restore
97104
98105 - name : Publish Android
99- run : dotnet publish demo/Ursa.Demo.Android -c Release -f net8.0-android --no-restore -o ./ publish -p:RuntimeIdentifier=android-arm64
106+ run : dotnet publish demo/Ursa.Demo.Android -c Release -f net8.0-android --no-restore -o publish -p:RuntimeIdentifier=android-arm64
100107
101108 - name : Upload a Build Artifact
102109 uses : actions/upload-artifact@v4.3.1
103110 with :
104111 name : android
105- path : ./ publish/*Signed.apk
112+ path : publish/*Signed.apk
0 commit comments