Skip to content

Commit

Permalink
Merge pull request #6 from sensslen/prepare-release
Browse files Browse the repository at this point in the history
prepare release
  • Loading branch information
sensslen committed Dec 9, 2023
2 parents 64bbbf6 + 85c3865 commit c2defd1
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 51 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "Main workflow"

on: [push, pull_request]
on: [pull_request]

jobs:
test:
Expand Down Expand Up @@ -42,6 +42,23 @@ jobs:
- name: test
run: dotnet test --configuration ${{ matrix.buildConfiguration }} --no-restore

check_code_format:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Add dotnet-format problem matcher
uses: xt0rted/dotnet-format-problem-matcher@v1

- name: Restore dotnet tools
uses: xt0rted/dotnet-tool-restore@v1

- name: Run dotnet format
uses: xt0rted/dotnet-format@v1
with:
only-changed-files: "true"

check_licenses:
runs-on: ubuntu-latest
strategy:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ jobs:
run: dotnet pack ./src/NuGetUtility/NuGetUtility.csproj -c Release --no-build -o ./artifacts -p:Version=${{ steps.version.outputs.full_without_prefix }}

- name: Zip artifacts
uses: tomchavakis/action-zip@v0.1.1
uses: thedoctor0/zip-release@0.7.5
with:
args: zip -qq -r ./release.zip ./artifacts
type: 'zip'
filename: 'release.zip'
path: ./artifacts

- name: Release
uses: softprops/action-gh-release@v1
Expand Down
16 changes: 0 additions & 16 deletions Dockerfile

This file was deleted.

39 changes: 10 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
# Nuget License Utility [![Build Status](https://travis-ci.com/tomchavakis/nuget-license.svg?branch=develop)](https://travis-ci.com/tomchavakis/nuget-license.svg?branch=develop) [![NuGet](https://img.shields.io/nuget/v/dotnet-project-licenses.svg)](https://www.nuget.org/packages/dotnet-project-licenses)
# Nuget License Utility

A .net core tool to print the licenses of a project. This tool supports .NET Core and .NET Standard and .NET Framework
Projects.
A .net core tool to print and validate the licenses of a project. This tool supports .NET (Core), .NET Standard and .NET Framework Projects.

## dotnet-project-licenses tool
## nuget-license tool

### Install tool

```ps
dotnet tool install --global dotnet-project-licenses
dotnet tool install --global nuget-license
```

### Uninstall tool

```ps
dotnet tool uninstall --global dotnet-project-licenses
dotnet tool uninstall --global nuget-license
```

## Usage

Usage: dotnet-project-licenses [options]
Usage: nuget-license [options]

**Options:**

Expand All @@ -43,35 +42,17 @@ Usage: dotnet-project-licenses [options]
### Show help

```ps
dotnet-project-licenses --help
nuget-license --help
```

### Validate licenses for .csproj file

```ps
dotnet-project-licenses -i project.csproj
nuget-license -i project.csproj
```

### Generate machine readable output

```ps
dotnet-project-licenses -i project.csproj -o jsonPretty
```

## Docker

### Build the image

```
docker build . -t nuget-license
```

### Run the same example commands as above in docker

```ps
docker run -it -v projectPath:/tmp nuget-license --help
```

```ps
docker run -it -v projectPath:/tmp nuget-license -i /tmp/project.csproj
```
nuget-license -i project.csproj -o jsonPretty
```
6 changes: 3 additions & 3 deletions src/NuGetUtility/NuGetUtility.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<PackageType>DotnetTool</PackageType>
<RepositoryType>git</RepositoryType>
<Version>100.100.100</Version>
<PackageId>dotnet-project-licenses</PackageId>
<ToolCommandName>dotnet-project-licenses</ToolCommandName>
<PackageId>nuget-license</PackageId>
<ToolCommandName>nuget-license</ToolCommandName>
<Authors>Tom Chavakis,Simon Ensslen</Authors>
<Company>-</Company>
<Title>.NET Core Tool to print and validate the licenses of dotnet project(s)</Title>
<PackageProjectUrl>https://github.com/tomchavakis/nuget-license</PackageProjectUrl>
<PackageProjectUrl>https://github.com/sensslen/nuget-license</PackageProjectUrl>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<GeneratePackageOnBuild Condition="'$(GeneratePackageOnBuild)' == ''">false</GeneratePackageOnBuild>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
Expand Down

0 comments on commit c2defd1

Please sign in to comment.