forked from tomchavakis/nuget-license
-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
don't pack netframework as tool, as this is not supported
- Loading branch information
Showing
11 changed files
with
213 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
["./src/NuGetUtility/NuGetUtility.csproj"] | ||
["./src/NuGetLicenseCore/NuGetLicenseCore.csproj","./src/NuGetLicenseFramework/NuGetLicenseFramework.csproj"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,21 +48,21 @@ jobs: | |
id: artifacts_path | ||
shell: pwsh | ||
run: | | ||
New-Item -ItemType "directory" -Path "./artifacts" | ||
$path = Resolve-Path ./artifacts | ||
echo "::set-output name=path::$path" | ||
$path = [System.IO.Path]::GetFullPath("./artifacts"); | ||
echo "publish to path: $path" | ||
echo "path={$path}" >> $GITHUB_OUTPUT | ||
- name: Publish the application binaries (.net6) | ||
run: msbuild ./src/NuGetUtility/NuGetUtility.csproj /t:Publish /p:configuration=Release /p:OutDir=${{ steps.artifacts_path.path}}/net6 /p:TargetFramework=net6.0 /p:Version=${{ steps.version.outputs.full_without_prefix }} | ||
run: dotnet publish ./src/NuGetLicenseCore/NuGetLicenseCore.csproj -c Release --no-restore -o ${{ steps.artifacts_path.path }}/net6 -f net6.0 -p:Version=${{ steps.version.outputs.full_without_prefix }} | ||
- name: Publish the application binaries (.net7) | ||
run: msbuild ./src/NuGetUtility/NuGetUtility.csproj /t:Publish /p:configuration=Release /p:OutDir=${{ steps.artifacts_path.path}}/net7 /p:TargetFramework=net7.0 /p:Version=${{ steps.version.outputs.full_without_prefix }} | ||
run: dotnet publish ./src/NuGetLicenseCore/NuGetLicenseCore.csproj -c Release --no-restore -o ${{ steps.artifacts_path.path }}/net7 -f net7.0 -p:Version=${{ steps.version.outputs.full_without_prefix }} | ||
- name: Publish the application binaries (.net8) | ||
run: msbuild ./src/NuGetUtility/NuGetUtility.csproj /t:Publish /p:configuration=Release /p:OutDir=${{ steps.artifacts_path.path}}/net8 /p:TargetFramework=net8.0 /p:Version=${{ steps.version.outputs.full_without_prefix }} | ||
run: dotnet publish ./src/NuGetLicenseCore/NuGetLicenseCore.csproj -c Release --no-restore -o ${{ steps.artifacts_path.path }}/net8 -f net8.0 -p:Version=${{ steps.version.outputs.full_without_prefix }} | ||
- name: Publish the application binaries (.net472) | ||
run: msbuild ./src/NuGetUtility/NuGetUtility.csproj /t:Publish /p:configuration=Release /p:OutDir=${{ steps.artifacts_path.path}}/net472 /p:TargetFramework=net472 /p:Version=${{ steps.version.outputs.full_without_prefix }} | ||
run: msbuild ./src/NuGetLicenseFramework/NuGetLicenseFramework.csproj /t:Publish /p:configuration=Release /p:PublishDir=${{ steps.artifacts_path.path }}/net472 /p:Version=${{ steps.version.outputs.full_without_prefix }} | ||
- name: Create nuget package | ||
run: msbuild ./src/NuGetUtility/NuGetUtility.csproj /t:Pack /p:configuration=Release /p:OutDir=${{ steps.artifacts_path.path}} /p:Version=${{ steps.version.outputs.full_without_prefix }} | ||
run: dotnet pack ./src/NuGetLicenseCore/NuGetLicenseCore.csproj -c Release --no-build -o ${{ steps.artifacts_path.path }} -p:Version=${{ steps.version.outputs.full_without_prefix }} | ||
|
||
- name: Zip artifacts | ||
uses: thedoctor0/[email protected] | ||
with: | ||
|
@@ -81,4 +81,4 @@ jobs: | |
- name: publish nuget package to nuget.org | ||
id: publish_nuget | ||
run: dotnet nuget push ${{ steps.artifacts_path.path}}/*.nupkg -s 'https://api.nuget.org/v3/index.json' -k ${{secrets.NUGET_KEY}} --skip-duplicate | ||
run: dotnet nuget push ${{ steps.artifacts_path.path }}/*.nupkg -s 'https://api.nuget.org/v3/index.json' -k ${{ secrets.NUGET_KEY }} --skip-duplicate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks> | ||
<IsPackable>true</IsPackable> | ||
<PackAsTool>true</PackAsTool> | ||
<PackageType>DotnetTool</PackageType> | ||
<RepositoryType>git</RepositoryType> | ||
<Version>100.100.100</Version> | ||
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion> | ||
<PackageId>nuget-license</PackageId> | ||
<ToolCommandName>nuget-license</ToolCommandName> | ||
<Authors>Tom Chavakis,Simon Ensslen</Authors> | ||
<Company>-</Company> | ||
<Title>.NET Tool to print and validate the licenses of dotnet project(s)</Title> | ||
<PackageProjectUrl>https://github.com/sensslen/nuget-license</PackageProjectUrl> | ||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression> | ||
<GeneratePackageOnBuild Condition="'$(GeneratePackageOnBuild)' == ''">false</GeneratePackageOnBuild> | ||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<Configurations>Debug;Release;TestWindows</Configurations> | ||
<Platforms>AnyCPU</Platforms> | ||
<PackageReadmeFile>README.md</PackageReadmeFile> | ||
<Description>A .net tool to print and validate the licenses of .net code. This tool supports .NET (Core), .NET Standard and .NET Framework projects.</Description> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="..\..\README.md"> | ||
<Pack>true</Pack> | ||
<PackagePath>README.md</PackagePath> | ||
</Content> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\NuGetUtility\NuGetUtility.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Licensed to the projects contributors. | ||
// The license conditions are provided in the LICENSE file located in the project root | ||
|
||
using McMaster.Extensions.CommandLineUtils; | ||
using NuGetUtility; | ||
|
||
namespace NuGetLicenseCore | ||
{ | ||
public static class Program | ||
{ | ||
public static async Task Main(string[] args) | ||
{ | ||
var lifetime = new AppLifetime(); | ||
int returnCode = await CommandLineApplication.ExecuteAsync<NuGetUtility.Program>(args, lifetime.Token); | ||
lifetime.Done(returnCode); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net472</TargetFramework> | ||
<RepositoryType>git</RepositoryType> | ||
<Version>100.100.100</Version> | ||
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion> | ||
<PackageId>nuget-license</PackageId> | ||
<ToolCommandName>nuget-license</ToolCommandName> | ||
<Authors>Tom Chavakis,Simon Ensslen</Authors> | ||
<Company>-</Company> | ||
<Title>.NET Tool to print and validate the licenses of dotnet project(s)</Title> | ||
<PackageProjectUrl>https://github.com/sensslen/nuget-license</PackageProjectUrl> | ||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression> | ||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<Configurations>Debug;Release;TestWindows</Configurations> | ||
<Platforms>AnyCPU</Platforms> | ||
<Description>A .net tool to print and validate the licenses of .net code. This tool supports .NET (Core), .NET Standard and .NET Framework projects.</Description> | ||
<LangVersion>10.0</LangVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="..\..\README.md"> | ||
<Pack>true</Pack> | ||
<PackagePath>README.md</PackagePath> | ||
</Content> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\NuGetUtility\NuGetUtility.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Licensed to the projects contributors. | ||
// The license conditions are provided in the LICENSE file located in the project root | ||
|
||
using McMaster.Extensions.CommandLineUtils; | ||
using NuGetUtility; | ||
|
||
namespace NuGetLicenseFramework | ||
{ | ||
public static class Program | ||
{ | ||
public static async Task Main(string[] args) | ||
{ | ||
var lifetime = new AppLifetime(); | ||
int returnCode = await CommandLineApplication.ExecuteAsync<NuGetUtility.Program>(args, lifetime.Token); | ||
lifetime.Done(returnCode); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters