Skip to content

Commit ad86ca0

Browse files
committed
Update to .NET 7
1 parent be93d97 commit ad86ca0

File tree

4 files changed

+18
-20
lines changed

4 files changed

+18
-20
lines changed

.github/workflows/dotnet.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313

1414
env:
1515
CONFIGURATION: Release
16-
DOTNET_VERSION: 6.0.x
16+
DOTNET_VERSION: 7.0.x
1717

1818
jobs:
1919
dotnet:
@@ -36,17 +36,17 @@ jobs:
3636
- name: Test
3737
run: dotnet test --configuration "$CONFIGURATION" --no-restore --verbosity normal
3838
- name: Publish linux-arm64
39-
run: dotnet publish --configuration "$CONFIGURATION" --no-restore --runtime linux-arm64 --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:SuppressTrimAnalysisWarnings=true
39+
run: dotnet publish --configuration "$CONFIGURATION" --no-restore --runtime linux-arm64 --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:SuppressTrimAnalysisWarnings=true /p:TrimMode=partial
4040
- name: Publish linux-x64
41-
run: dotnet publish --configuration "$CONFIGURATION" --no-restore --runtime linux-x64 --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:SuppressTrimAnalysisWarnings=true
41+
run: dotnet publish --configuration "$CONFIGURATION" --no-restore --runtime linux-x64 --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:SuppressTrimAnalysisWarnings=true /p:TrimMode=partial
4242
- name: Publish osx-arm64
43-
run: dotnet publish --configuration "$CONFIGURATION" --no-restore --runtime osx-arm64 --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:SuppressTrimAnalysisWarnings=true
43+
run: dotnet publish --configuration "$CONFIGURATION" --no-restore --runtime osx-arm64 --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:SuppressTrimAnalysisWarnings=true /p:TrimMode=partial
4444
- name: Publish osx-x64
45-
run: dotnet publish --configuration "$CONFIGURATION" --no-restore --runtime osx-x64 --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:SuppressTrimAnalysisWarnings=true
45+
run: dotnet publish --configuration "$CONFIGURATION" --no-restore --runtime osx-x64 --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:SuppressTrimAnalysisWarnings=true /p:TrimMode=partial
4646
- name: Publish win-arm64
47-
run: dotnet publish --configuration "$CONFIGURATION" --no-restore --runtime win-arm64 --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:SuppressTrimAnalysisWarnings=true
47+
run: dotnet publish --configuration "$CONFIGURATION" --no-restore --runtime win-arm64 --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:SuppressTrimAnalysisWarnings=true /p:TrimMode=partial
4848
- name: Publish win-x64
49-
run: dotnet publish --configuration "$CONFIGURATION" --no-restore --runtime win-x64 --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:SuppressTrimAnalysisWarnings=true
49+
run: dotnet publish --configuration "$CONFIGURATION" --no-restore --runtime win-x64 --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:SuppressTrimAnalysisWarnings=true /p:TrimMode=partial
5050
- name: Release
5151
if: github.event_name == 'create' && github.event.ref_type == 'tag'
5252
uses: softprops/action-gh-release@v1

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build
1+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:7.0-alpine AS build
22
ARG TARGETPLATFORM
33
WORKDIR /src
44

@@ -18,9 +18,9 @@ RUN case "$TARGETPLATFORM" in \
1818
linux/arm64) RUNTIME=linux-musl-arm64 ;; \
1919
*) echo "Unsupported Platform: $TARGETPLATFORM"; exit 1 ;; \
2020
esac && \
21-
dotnet publish --configuration Release --no-restore --output /app --runtime $RUNTIME --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:SuppressTrimAnalysisWarnings=true
21+
dotnet publish --configuration Release --no-restore --output /app --runtime $RUNTIME --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:SuppressTrimAnalysisWarnings=true /p:TrimMode=partial
2222

23-
FROM mcr.microsoft.com/dotnet/runtime-deps:6.0-alpine
23+
FROM mcr.microsoft.com/dotnet/runtime-deps:7.0-alpine
2424
RUN apk add --no-cache tzdata
2525
WORKDIR /app
2626
COPY --from=build /app ./

LXGaming.FloodAnalytics/LXGaming.FloodAnalytics.csproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net7.0</TargetFramework>
66
<RuntimeIdentifiers>linux-x64;linux-arm64;osx-x64;osx-arm64;win-x64;win-arm64</RuntimeIdentifiers>
77
<ImplicitUsings>enable</ImplicitUsings>
88
<Nullable>enable</Nullable>
@@ -13,12 +13,12 @@
1313
</PropertyGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="InfluxDB.Client" Version="4.9.0" />
17-
<PackageReference Include="LXGaming.Common.Hosting" Version="1.4.5" />
18-
<PackageReference Include="LXGaming.Common.Serilog" Version="1.4.5" />
19-
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
20-
<PackageReference Include="Quartz.Extensions.Hosting" Version="3.5.0" />
21-
<PackageReference Include="Serilog.Extensions.Hosting" Version="5.0.1" />
16+
<PackageReference Include="InfluxDB.Client" Version="4.13.0" />
17+
<PackageReference Include="LXGaming.Common.Hosting" Version="1.5.1" />
18+
<PackageReference Include="LXGaming.Common.Serilog" Version="1.5.1" />
19+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
20+
<PackageReference Include="Quartz.Extensions.Hosting" Version="3.7.0" />
21+
<PackageReference Include="Serilog.Extensions.Hosting" Version="7.0.0" />
2222
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
2323
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
2424
<PackageReference Include="Serilog.Sinks.File.Archive" Version="1.0.3" />

LXGaming.FloodAnalytics/Program.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@
4646

4747
options.Add("quartz.threadPool.maxConcurrency", $"{quartzCategory.MaxConcurrency}");
4848
});
49-
services.AddQuartz(configurator => {
50-
configurator.UseMicrosoftDependencyInjectionJobFactory();
51-
});
49+
services.AddQuartz();
5250
services.AddQuartzHostedService(options => options.WaitForJobsToComplete = true);
5351

5452
services.AddAllServices(Assembly.GetExecutingAssembly());

0 commit comments

Comments
 (0)