Skip to content

Commit

Permalink
Merge pull request #217 from tomchavakis/net8
Browse files Browse the repository at this point in the history
Quick'n'dirty net8
  • Loading branch information
Lexy2 authored Feb 28, 2025
2 parents ac9014f + 943d79e commit 4b7130e
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 50 deletions.
21 changes: 4 additions & 17 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,11 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Setup dotnet 3.0.100
uses: actions/setup-dotnet@v2
- uses: actions/checkout@v4
- name: Setup dotnet 8.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: "3.1.100" # SDK Version to use.
- name: Setup dotnet 5.0.x
uses: actions/setup-dotnet@v2
with:
dotnet-version: "5.0.x" # SDK Version to use (x uses the latest version).
- name: Setup dotnet 6.0.x
uses: actions/setup-dotnet@v2
with:
dotnet-version: "6.0.x" # SDK Version to use (x uses the latest version).
- name: Setup dotnet 7.0.x
uses: actions/setup-dotnet@v2
with:
dotnet-version: "7.0.x" # SDK Version to use (x uses the latest version).
dotnet-version: "8.x" # SDK Version to use (x uses the latest version).
# dotnet restore
- name: restore
run: dotnet restore
Expand Down
31 changes: 6 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,11 @@ jobs:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Setup dotnet 3.0.100
uses: actions/setup-dotnet@v2
- uses: actions/checkout@v4
- name: Setup dotnet 8.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: "3.1.100" # SDK Version to use.
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Setup dotnet 5.0.x
uses: actions/setup-dotnet@v2
with:
dotnet-version: "5.0.x" # SDK Version to use (x uses the latest version).
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Setup dotnet 6.0.x
uses: actions/setup-dotnet@v2
with:
dotnet-version: "6.0.x" # SDK Version to use (x uses the latest version).
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Setup dotnet 7.0.x
uses: actions/setup-dotnet@v2
with:
dotnet-version: "7.0.103" # SDK Version to use (x uses the latest version).
dotnet-version: "8.x" # SDK Version to use (x uses the latest version).
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
# dotnet restore
Expand All @@ -52,10 +33,10 @@ jobs:
run: dotnet pack --configuration Release
# publish the package
- name: Publish the artifact
run: dotnet publish -f net7.0 -c Release -o ./artifacts
run: dotnet publish -f net8.0 -c Release -o ./artifacts
# publish the package to package folder
- name: Publish the artifact
run: dotnet publish -f net7.0 -c Release -o ./package
run: dotnet publish -f net8.0 -c Release -o ./package
# Add nuget package
- name: Nuget package
run: dotnet pack -c Release -o ./artifacts
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
WORKDIR /src


Expand All @@ -7,10 +7,10 @@ RUN dotnet restore


COPY . ./
RUN dotnet publish -f net7.0 -c Release -o out
RUN dotnet publish -f net8.0 -c Release -o out


FROM mcr.microsoft.com/dotnet/runtime:7.0
FROM mcr.microsoft.com/dotnet/runtime:8.0
WORKDIR /src
COPY --from=build-env /src/out .
ENTRYPOINT ["dotnet", "NugetUtility.dll"]
1 change: 0 additions & 1 deletion src/LicenseToUrlMappings.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.CodeAnalysis;

namespace NugetUtility
{
Expand Down
6 changes: 3 additions & 3 deletions src/NugetUtility.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LangVersion>latest</LangVersion>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
Expand All @@ -12,8 +12,8 @@
<RepositoryType>git</RepositoryType>
<PackageId>dotnet-project-licenses</PackageId>
<ToolCommandName>dotnet-project-licenses</ToolCommandName>
<Version>2.7.1</Version>
<Authors>Tom Chavakis, Lexy2, senslen</Authors>
<Version>2.7.2</Version>
<Authors>Tom Chavakis, Lexy2, sensslen</Authors>
<Company>-</Company>
<Title>.NET Core Tool to print a list of the licenses of a projects</Title>
<PackageProjectUrl>https://github.com/tomchavakis/nuget-license</PackageProjectUrl>
Expand Down
2 changes: 1 addition & 1 deletion tests/NugetUtility.Tests/NugetUtility.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0;</TargetFrameworks>
<TargetFrameworks>net8.0;</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<LangVersion>latest</LangVersion>
Expand Down

0 comments on commit 4b7130e

Please sign in to comment.