KinsonDigital / BranchValidator

Validates branch names for the organization projects
MIT License
5 stars 1 forks source link

🚧Update dotnet to latest version #70

Closed CalvinWilkinson closed 1 year ago

CalvinWilkinson commented 1 year ago

Complete The Item Below

Description

Update dotnet and the lang to the latest versions.

The version as of the creation of this issue is v7.0

Update the cs proj file

  <PropertyGroup>
    <OutputType>Exe</OutputType>
-    <TargetFramework>net6.0</TargetFramework>
+    <TargetFramework>net7.0</TargetFramework>
-    <LangVersion>10.0</LangVersion>
+    <LangVersion>11.0</LangVersion>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <RootNamespace>GotNuget</RootNamespace>

    <!--Update this for production and preview releases-->
    <Version>0.1.0</Version>

    <!--Update this for production and preview releases-->
    <FileVersion>0.1.0</FileVersion>

    <Authors>Calvin Wilkinson</Authors>
    <Company>Kinson Digital</Company>
    <Product>GotNuget</Product>
    <Description>Custom GitHub action used to check if nuget.org contains a NuGet package of a particular version.</Description>
    <Copyright>Copyright ©2022 Kinson Digital</Copyright>
  </PropertyGroup>

Update the docker file:

Note This is located 👉🏼 ./Dockerfile

- # Set the base image as the .NET 6.0 SDK (this includes the runtime)
+ # Set the base image as the .NET 7.0 SDK (this includes the runtime)
- FROM mcr.microsoft.com/dotnet/sdk:6.0 as build-env
+ FROM mcr.microsoft.com/dotnet/sdk:7.0 as build-env

# Copy everything and publish the release (publish implicitly restores and builds)
COPY . ./
RUN dotnet publish ./GotNuget/GotNuget.csproj -c Release -o out --no-self-contained

# Label the container
LABEL maintainer="Calvin Wilkinson <kinsondigital@gmail.com>"
LABEL repository="https://github.com/KinsonDigital/GotNuget"
LABEL homepage="https://github.com/KinsonDigital/GotNuget"

# Label as GitHub action
LABEL com.github.actions.name="Got Nuget"

# Relayer the .NET SDK, anew with the build output
- FROM mcr.microsoft.com/dotnet/sdk:6.0
+ FROM mcr.microsoft.com/dotnet/sdk:7.0
COPY --from=build-env /out .
ENTRYPOINT [ "dotnet", "/GotNuget.dll" ]

Acceptance Criteria

ToDo Items

Issue Dependencies

No response

Related Work

No response

Additional Information:

Change Type Labels

Change Type Label
Bug Fixes 🐛bug
Breaking Changes 🧨breaking changes
New Feature ✨new feature
Workflow Changes workflow
Code Doc Changes 🗒️documentation/code
Product Doc Changes 📝documentation/product

Priority Type Labels

Priority Type Label
Low Priority low priority
Medium Priority medium priority
High Priority high priority

Code of Conduct

CalvinWilkinson commented 1 year ago

Note Updated various NuGet packages throughout the entire solution