1313 - ' linux'
1414 - ' android'
1515 - ' all'
16- include_aot :
17- description : ' Include Windows AOT packaging '
16+ win64 :
17+ description : ' Windows x64 '
1818 required : true
1919 default : true
2020 type : boolean
21- include_drm :
22- description : ' Include Linux DRM packaging'
21+ win64_aot :
22+ description : ' Windows x64 AOT'
23+ required : true
24+ default : true
25+ type : boolean
26+ linux64 :
27+ description : ' Linux x64 AOT'
28+ required : true
29+ default : true
30+ type : boolean
31+ linux64_drm :
32+ description : ' Linux x64 DRM'
2333 required : true
2434 default : true
2535 type : boolean
@@ -36,34 +46,36 @@ jobs:
3646 run : mkdir upload
3747
3848 - name : Publish win-x64
39- run : dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/win64
49+ if : ${{ github.event.inputs.win64 == 'true' }}
50+ run : dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release -o publish/win64 --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
4051
4152 - name : Zip win-x64
53+ if : ${{ github.event.inputs.win64 == 'true' }}
4254 run : |
43- $files = Get-ChildItem -Path ./ publish/win64/* -Recurse -Exclude *.pdb
44- Compress-Archive -Path $files.FullName -DestinationPath ./ upload/Semi.Avalonia.Demo.Desktop.win-x64.zip
55+ $files = Get-ChildItem -Path publish/win64/* -Recurse -Exclude *.pdb
56+ Compress-Archive -Path $files.FullName -DestinationPath upload/Semi.Avalonia.Demo.Desktop.win-x64.zip
4557
4658 - name : Enable Native AOT in .csproj
47- if : ${{ github.event.inputs.include_aot == 'true' }}
59+ if : ${{ github.event.inputs.win64_aot == 'true' }}
4860 run : |
4961 sed -i 's#<!--<PublishAot>true</PublishAot>-->#<PublishAot>true</PublishAot>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
5062 sed -i 's#<!--<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>-->#<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
5163
5264 - name : Publish win-x64 AOT
53- if : ${{ github.event.inputs.include_aot == 'true' }}
54- run : dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release -o ./ publish/win64-aot
65+ if : ${{ github.event.inputs.win64_aot == 'true' }}
66+ run : dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release -o publish/win64-aot
5567
5668 - name : Zip win-x64 AOT
57- if : ${{ github.event.inputs.include_aot == 'true' }}
69+ if : ${{ github.event.inputs.win64_aot == 'true' }}
5870 run : |
59- $files = Get-ChildItem -Path ./ publish/win64-aot/* -Recurse -Exclude *.pdb
60- Compress-Archive -Path $files.FullName -DestinationPath ./ upload/Semi.Avalonia.Demo.Desktop.win-x64.NativeAOT.zip
71+ $files = Get-ChildItem -Path publish/win64-aot/* -Recurse -Exclude *.pdb
72+ Compress-Archive -Path $files.FullName -DestinationPath upload/Semi.Avalonia.Demo.Desktop.win-x64.NativeAOT.zip
6173
6274 - name : Upload a Build Artifact
6375 uses : actions/upload-artifact@v4.3.1
6476 with :
6577 name : windows
66- path : ./ upload
78+ path : upload
6779
6880 linux :
6981 if : ${{ github.event.inputs.platform == 'linux' || github.event.inputs.platform == 'all' }}
@@ -76,24 +88,26 @@ jobs:
7688 run : mkdir upload
7789
7890 - name : Publish linux-x64
79- run : dotnet publish demo/Semi.Avalonia.Demo.Desktop -r linux-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/linux64
91+ if : ${{ github.event.inputs.linux64 == 'true' }}
92+ run : dotnet publish demo/Semi.Avalonia.Demo.Desktop -r linux-x64 -c Release -o publish/linux64 --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
8093
8194 - name : Zip linux-x64
82- run : zip -j -r ./upload/Semi.Avalonia.Demo.Desktop.linux-x64.zip ./publish/linux64 -x "*.pdb"
95+ if : ${{ github.event.inputs.linux64 == 'true' }}
96+ run : zip -j -r upload/Semi.Avalonia.Demo.Desktop.linux-x64.zip publish/linux64 -x "*.pdb"
8397
8498 - name : Publish linux-x64 DRM
85- if : ${{ github.event.inputs.include_drm == 'true' }}
86- run : dotnet publish demo/Semi.Avalonia.Demo.Drm -r linux-x64 -c Release -- sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/drm
99+ if : ${{ github.event.inputs.linux64_drm == 'true' }}
100+ run : dotnet publish demo/Semi.Avalonia.Demo.Drm -r linux-x64 -c Release -o publish/drm -- sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
87101
88102 - name : Zip linux-x64 DRM
89- if : ${{ github.event.inputs.include_drm == 'true' }}
90- run : zip -j -r ./ upload/Semi.Avalonia.Demo.Drm.linux-x64.zip ./ publish/drm -x "*.pdb"
103+ if : ${{ github.event.inputs.linux64_drm == 'true' }}
104+ run : zip -j -r upload/Semi.Avalonia.Demo.Drm.linux-x64.zip publish/drm -x "*.pdb"
91105
92106 - name : Upload a Build Artifact
93107 uses : actions/upload-artifact@v4.3.1
94108 with :
95109 name : linux
96- path : ./ upload
110+ path : upload
97111
98112 android :
99113 if : ${{ github.event.inputs.platform == 'android' || github.event.inputs.platform == 'all' }}
@@ -103,16 +117,16 @@ jobs:
103117 uses : actions/checkout@v4.1.1
104118
105119 - name : CD Android
106- run : cd ./ demo/Semi.Avalonia.Demo.Android
120+ run : cd demo/Semi.Avalonia.Demo.Android
107121
108122 - name : Restore Dependencies
109123 run : dotnet restore
110124
111125 - name : Publish Android
112- run : dotnet publish demo/Semi.Avalonia.Demo.Android -c Release -f net8.0-android --no-restore -o ./ publish -p:RuntimeIdentifier=android-arm64
126+ run : dotnet publish demo/Semi.Avalonia.Demo.Android -c Release -f net8.0-android --no-restore -o publish -p:RuntimeIdentifier=android-arm64
113127
114128 - name : Upload a Build Artifact
115129 uses : actions/upload-artifact@v4.3.1
116130 with :
117131 name : android
118- path : ./ publish/*Signed.apk
132+ path : publish/*Signed.apk
0 commit comments