From 941f795150f03374a62c230d25d0d9e26f6115b5 Mon Sep 17 00:00:00 2001 From: Bervianto Leo Pratama Date: Sat, 25 Nov 2023 08:21:08 +0700 Subject: [PATCH] feat: Upgrade to .NET 8 --- .config/dotnet-tools.json | 2 +- .github/workflows/dotnet.yml | 2 +- Dockerfile | 4 ++-- .../PersonalWebApi.Integration.Test.csproj | 4 ++-- PersonalWebApi.Test/PersonalWebApi.Test.csproj | 2 +- PersonalWebApi.sln | 1 + PersonalWebApi/PersonalWebApi.csproj | 8 ++++---- 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index dbe7898..e3cadb9 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "dotnet-ef": { - "version": "7.0.13", + "version": "8.0.0", "commands": [ "dotnet-ef" ] diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 611116c..c9773a4 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -30,7 +30,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v3 with: - dotnet-version: "7.0.x" + dotnet-version: "8.0.x" - name: Install dependencies run: dotnet restore - name: Build diff --git a/Dockerfile b/Dockerfile index 66806ae..8245c9a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine as build +FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine as build WORKDIR /app COPY . . RUN dotnet restore RUN dotnet publish -c Release -o /app/publish -FROM mcr.microsoft.com/dotnet/aspnet:7.0-alpine as runtime +FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine as runtime COPY --from=build /app/publish /app/publish WORKDIR /app/publish CMD ASPNETCORE_URLS=http://*:$PORT dotnet PersonalWebApi.dll \ No newline at end of file diff --git a/PersonalWebApi.Integration.Test/PersonalWebApi.Integration.Test.csproj b/PersonalWebApi.Integration.Test/PersonalWebApi.Integration.Test.csproj index 13b78a9..b304b99 100644 --- a/PersonalWebApi.Integration.Test/PersonalWebApi.Integration.Test.csproj +++ b/PersonalWebApi.Integration.Test/PersonalWebApi.Integration.Test.csproj @@ -1,13 +1,13 @@ - net7.0 + net8.0 false - + diff --git a/PersonalWebApi.Test/PersonalWebApi.Test.csproj b/PersonalWebApi.Test/PersonalWebApi.Test.csproj index 906954e..b84c9ae 100644 --- a/PersonalWebApi.Test/PersonalWebApi.Test.csproj +++ b/PersonalWebApi.Test/PersonalWebApi.Test.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 false diff --git a/PersonalWebApi.sln b/PersonalWebApi.sln index d946d13..09e7fb6 100644 --- a/PersonalWebApi.sln +++ b/PersonalWebApi.sln @@ -14,6 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .github\workflows\codeql.yml = .github\workflows\codeql.yml .github\dependabot.yml = .github\dependabot.yml Dockerfile = Dockerfile + .config\dotnet-tools.json = .config\dotnet-tools.json .github\workflows\dotnet.yml = .github\workflows\dotnet.yml README.md = README.md EndProjectSection diff --git a/PersonalWebApi/PersonalWebApi.csproj b/PersonalWebApi/PersonalWebApi.csproj index a8bad32..13784bf 100644 --- a/PersonalWebApi/PersonalWebApi.csproj +++ b/PersonalWebApi/PersonalWebApi.csproj @@ -1,20 +1,20 @@ - net7.0 + net8.0 - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + all runtime; build; native; contentfiles; analyzers; buildtransitive - +