Skip to content

Commit

Permalink
Added support for .NET versions above 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianLeChat committed Nov 16, 2024
1 parent d7340f9 commit c4abb5e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
dotnet: [ "6.x", "7.x", "8.x" ]
framework: [ "net8.0", "net9.0" ]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}
dotnet-version: "9.x"
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
run: dotnet build --no-restore -f ${{ matrix.framework }}
- name: Test
run: dotnet test --no-build --verbosity normal
run: dotnet test --no-build --verbosity normal -f ${{ matrix.framework }}
- name: Publish Windows (arm64/x64)
run: |
dotnet publish src/FacepunchCommitsMonitor.csproj -c Release -r win-x64 --nologo --self-contained
dotnet publish src/FacepunchCommitsMonitor.csproj -c Release -r win-arm64 --nologo --self-contained
dotnet publish src/FacepunchCommitsMonitor.csproj -c Release -f ${{ matrix.framework }} -r win-x64 --nologo --self-contained
dotnet publish src/FacepunchCommitsMonitor.csproj -c Release -f ${{ matrix.framework }} -r win-arm64 --nologo --self-contained
- name: Upload Windows Builds
uses: actions/upload-artifact@v4
if: github.event_name == 'push'
with:
name: windows-builds-dotnet-${{ matrix.dotnet }}
name: windows-builds-${{ matrix.framework }}
path: |
${{ github.workspace }}/src/bin/Release/net8.0-windows10.0.22000.0/win-x64/publish/
${{ github.workspace }}/src/bin/Release/net8.0-windows10.0.22000.0/win-arm64/publish/
${{ github.workspace }}/src/bin/Release/${{ matrix.framework }}-windows10.0.22000.0/win-x64/publish/
${{ github.workspace }}/src/bin/Release/${{ matrix.framework }}-windows10.0.22000.0/win-arm64/publish/
2 changes: 1 addition & 1 deletion src/FacepunchCommitsMonitor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/desktop-to-uwp-enhance -->
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows10.0.22000.0</TargetFramework> <!-- Windows 11 -->
<TargetFrameworks>net8.0-windows10.0.22000.0;net9.0-windows10.0.22000.0</TargetFrameworks> <!-- Windows 11 -->
<TargetPlatformMinVersion>10.0.19044.3693</TargetPlatformMinVersion> <!-- Windows 10 version 21H2 (November 2021 Update) -->
<PublishSingleFile>true</PublishSingleFile>
<Platforms>win-arm64;x64</Platforms>
Expand Down
2 changes: 1 addition & 1 deletion tests/FacepunchCommitsMonitorTests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows10.0.22000.0</TargetFramework> <!-- Windows 11 -->
<TargetFrameworks>net8.0-windows10.0.22000.0;net9.0-windows10.0.22000.0</TargetFrameworks> <!-- Windows 11 -->
<TargetPlatformMinVersion>10.0.19044.3693</TargetPlatformMinVersion> <!-- Windows 10 version 21H2 (November 2021 Update) -->
<Platforms>win-arm64;x64</Platforms>
<Nullable>enable</Nullable>
Expand Down

0 comments on commit c4abb5e

Please sign in to comment.