Skip to content

Commit

Permalink
Update action to build artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
ButterscotchV committed Aug 6, 2024
1 parent 1cfe3c1 commit 71fcfae
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
33 changes: 32 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,18 @@ on:

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
- gh: ubuntu-22.04
cs: linux-x64
- gh: windows-latest
cs: win-x64
- gh: macos-latest
cs: osx-x64

runs-on: ${{ matrix.os.gh }}

steps:
- uses: actions/checkout@v4
Expand All @@ -32,3 +43,23 @@ jobs:

- name: Test
run: dotnet test --verbosity normal

- name: Publish CLI
run: dotnet publish SlimeVROta -c Release -r ${{ matrix.os.cs }} -o builds/cli-${{ matrix.os.cs }} -p:PublishAot=true

- name: Upload a build artifact (CLI)
uses: actions/upload-artifact@v4
with:
name: SlimeVR-OTA-${{ matrix.os.cs }}
# A file, directory or wildcard pattern that describes what to upload
path: builds/cli-${{ matrix.os.cs }}

- name: Publish GUI
run: dotnet publish SlimeVROta.Gui -c Release -r ${{ matrix.os.cs }} -o builds/gui-${{ matrix.os.cs }}

- name: Upload a build artifact (GUI)
uses: actions/upload-artifact@v4
with:
name: SlimeVR-OTA-GUI-${{ matrix.os.cs }}
# A file, directory or wildcard pattern that describes what to upload
path: builds/gui-${{ matrix.os.cs }}
8 changes: 6 additions & 2 deletions SlimeVrOta.Gui/SlimeVrOta.Gui.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0</TargetFramework>
Expand All @@ -9,6 +9,10 @@
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
<AssemblyName>SlimeVR-OTA-GUI</AssemblyName>
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<PublishTrimmed>true</PublishTrimmed>
<StripSymbols>true</StripSymbols>
</PropertyGroup>

<ItemGroup>
Expand All @@ -35,5 +39,5 @@
<ItemGroup>
<Content Include="Assets\icon.ico" />
</ItemGroup>

</Project>
4 changes: 4 additions & 0 deletions SlimeVrOta/SlimeVrOta.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<Nullable>enable</Nullable>
<AssemblyName>SlimeVR-OTA</AssemblyName>
<ApplicationIcon>icon.ico</ApplicationIcon>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<PublishTrimmed>true</PublishTrimmed>
<StripSymbols>true</StripSymbols>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 71fcfae

Please sign in to comment.