Skip to content

Commit 4b87192

Browse files
committed
Build the web config for linux
1 parent cc41f3a commit 4b87192

File tree

3 files changed

+45
-21
lines changed

3 files changed

+45
-21
lines changed
Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ on:
99
workflow_call:
1010
workflow_dispatch:
1111

12-
name: ci-windows
12+
name: ci-build
1313

1414
env:
1515
DOTNET_VERSION: 9.0.x
1616
REGISTRY: ghcr.io
1717

1818
jobs:
1919

20-
build:
20+
build-windows-maui:
2121
runs-on: windows-latest
2222

2323
steps:
@@ -36,24 +36,24 @@ jobs:
3636
uses: actions/cache@v4
3737
with:
3838
path: ~/.nuget/packages
39-
key: ${{ runner.os }}-nuget
39+
key: windows-maui-nuget
4040
restore-keys: |
41-
${{ runner.os }}-nuget
41+
windows-maui-nuget
4242
4343
- name: Publish OpenShock Desktop Windows
44-
run: dotnet publish Desktop/Desktop.csproj -c Release-Windows -o ./publish/Desktop
44+
run: dotnet publish Desktop/Desktop.csproj -c Release-Windows -o ./publish/Windows-Maui
4545

4646
- name: Upload OpenShock Desktop Windows artifacts
4747
uses: actions/upload-artifact@v4
4848
with:
49-
name: OpenShock Desktop Windows
50-
path: publish/Desktop/*
49+
name: OpenShock Desktop Windows MAUI
50+
path: publish/Windows-Maui/*
5151
retention-days: 1
5252
if-no-files-found: error
5353

54-
installer:
54+
installer-windows-maui:
5555
runs-on: windows-latest
56-
needs: build
56+
needs: build-windows-maui
5757

5858
steps:
5959
- name: Checkout
@@ -65,7 +65,7 @@ jobs:
6565
- name: Download artifacts
6666
uses: actions/download-artifact@v4
6767
with:
68-
name: OpenShock Desktop Windows
68+
name: OpenShock Desktop Windows MAUI
6969
path: publish/
7070

7171

@@ -82,3 +82,27 @@ jobs:
8282
path: Installer/OpenShock_Desktop_Setup.exe
8383
retention-days: 7
8484
if-no-files-found: error
85+
86+
87+
build-linux-web:
88+
runs-on: ubuntu-latest
89+
90+
steps:
91+
- name: Checkout
92+
uses: actions/checkout@v4
93+
94+
- name: Setup .NET SDK ${{ env.DOTNET_VERSION }}
95+
uses: actions/setup-dotnet@v4
96+
with:
97+
dotnet-version: ${{ env.DOTNET_VERSION }}
98+
99+
- name: Cache NuGet packages
100+
uses: actions/cache@v4
101+
with:
102+
path: ~/.nuget/packages
103+
key: linux-web-nuget
104+
restore-keys: |
105+
linux-web-nuget
106+
107+
- name: Publish OpenShock Web
108+
run: dotnet publish Desktop/Desktop.csproj -c Release-Web -o ./publish/Web-Linux

Desktop.slnx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@
22
<Configurations>
33
<BuildType Name="Debug-Web" />
44
<BuildType Name="Debug-Windows" />
5+
<BuildType Name="Release-Web" />
56
<BuildType Name="Release-Windows" />
67
</Configurations>
78
<Project Path="Desktop/Desktop.csproj" />
8-
<Project Path="ExampleModule/ExampleModule.csproj" />
9+
<Project Path="ExampleModule/ExampleModule.csproj">
10+
<Configuration Solution="Debug-Web|Any CPU" Project="Debug|Any CPU" />
11+
<Configuration Solution="Debug-Windows|Any CPU" Project="Debug|Any CPU" />
12+
<Configuration Solution="Release-Windows|Any CPU" Project="Release|Any CPU" />
13+
<Configuration Solution="Release-Web|Any CPU" Project="Release|Any CPU" />
14+
</Project>
915
<Project Path="ModuleBase/ModuleBase.csproj">
16+
<Configuration Solution="Debug-Web|Any CPU" Project="Debug|Any CPU" />
1017
<Configuration Solution="Debug-Windows|Any CPU" Project="Debug|Any CPU" />
18+
<Configuration Solution="Release-Windows|Any CPU" Project="Release|Any CPU" />
19+
<Configuration Solution="Release-Web|Any CPU" Project="Release|Any CPU" />
1120
</Project>
1221
</Solution>

ExampleModule/ExampleModule.csproj

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,10 @@
77
<OutputType>Library</OutputType>
88
<AssemblyName>OpenShock.Desktop.Modules.ExampleModule</AssemblyName>
99
<RootNamespace>OpenShock.Desktop.Modules.ExampleModule</RootNamespace>
10-
<Configurations>Debug-Web;Release-Windows;Debug-Windows</Configurations>
10+
<Configurations>Debug;Release</Configurations>
1111
<Platforms>AnyCPU</Platforms>
1212
</PropertyGroup>
1313

14-
<PropertyGroup Condition=" '$(Configuration)' == 'Release-Windows' ">
15-
<Optimize Condition=" '$(Optimize)' == '' ">true</Optimize>
16-
</PropertyGroup>
17-
18-
<PropertyGroup Condition=" '$(Configuration)' == 'Debug-Windows' ">
19-
<DebugSymbols Condition=" '$(DebugSymbols)' == '' ">true</DebugSymbols>
20-
<Optimize Condition=" '$(Optimize)' == '' ">false</Optimize>
21-
</PropertyGroup>
22-
2314
<ItemGroup>
2415
<ProjectReference Include="..\ModuleBase\ModuleBase.csproj" />
2516
</ItemGroup>

0 commit comments

Comments
 (0)