Skip to content

Commit

Permalink
Merge pull request #39 from Lombiq/issue/INFRA-92
Browse files Browse the repository at this point in the history
INFRA-92: NuGet publish
  • Loading branch information
Piedone authored Feb 15, 2022
2 parents 1c617c5 + c5ebdb9 commit 862d0c8
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: publish

on:
push:
tags:
- v*

jobs:
call-publish-workflow:
uses: Lombiq/GitHub-Actions/.github/workflows/publish.yml@dev
secrets:
API_KEY: ${{ secrets.DEFAULT_NUGET_PUBLISH_API_KEY }}
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.vs/
obj/
bin/
artifacts/
wwwroot/
node_modules/
*.user
.pnpm-debug.log
7 changes: 7 additions & 0 deletions Docs/AddingAnalyzers.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ For at least Visual Studio and JetBrains Rider you don't need any further setup
```


## How to add the analyzers to SDK-style projects from NuGet

The recommended approach for SDK-style projects is adding .NET Analyzers as a submodule as explained above due to the increased control you have over configuration. However, if you aren't using Git or prefer NuGet, you can also use the [NuGet package](https://www.nuget.org/packages/Lombiq.Analyzers/) to install it for just one project. Once you add the package to your project, all analyzers will be applied.

You can also add the package to all projects in a folder at once from a *Directory.Build.props* file (much like we do in [*CommonPackages.props*](../CommonPackages.props).


## How to add the analyzers to individual non-SDK-style .NET Framework projects (not solutions)

1. Same as above - add the .NET-Analyzers repository as a submodule to your repository.
Expand Down
33 changes: 33 additions & 0 deletions Lombiq.Analyzers.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<DefaultItemExcludes>$(DefaultItemExcludes);.git*;</DefaultItemExcludes>
</PropertyGroup>

<PropertyGroup>
<Title>Lombiq .NET Analyzers</Title>
<Authors>Lombiq Technologies</Authors>
<Copyright>Copyright © 2020, Lombiq Technologies Ltd.</Copyright>
<Description>.NET code analyzers and code convention settings for Lombiq (https://lombiq.com) projects, predominantly for Orchard Core (https://www.orchardcore.net/) apps but also any .NET apps. See the project website for detailed documentation.</Description>
<PackageIcon>NuGetIcon.png</PackageIcon>
<PackageTags>OrchardCore;Lombiq;AspNetCore;CodeAnalysis;DotNetAnalyzers;Analyzer;Analyzers;Diagnostic;Roslyn;Refactoring;AsyncFixer;Meziantou.Analyzer;StyleCop</PackageTags>
<RepositoryUrl>https://github.com/Lombiq/.NET-Analyzers</RepositoryUrl>
<PackageProjectUrl>https://github.com/Lombiq/.NET-Analyzers</PackageProjectUrl>
<PackageLicenseFile>Licence.md</PackageLicenseFile>
<NoDefaultExcludes>true</NoDefaultExcludes>
</PropertyGroup>

<ItemGroup>
<None Include="Licence.md" Pack="true" PackagePath="" />
<None Include="Readme.md" />
<None Include="NuGetIcon.png" Pack="true" PackagePath="" />
<None Include="build\**" Pack="true" PackagePath="build\" />
<None Include=".editorconfig" Pack="true" PackagePath="" />
<None Include="*.props" Pack="true" PackagePath="" />
<None Include="*.ruleset" Pack="true" PackagePath="" />
<None Include="*.xml" Pack="true" PackagePath="" />
<None Include="*.json" Pack="true" PackagePath="" />
</ItemGroup>

</Project>
Binary file added NuGetIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@



[![Lombiq.Analyzers NuGet](https://img.shields.io/nuget/v/Lombiq.Analyzers?label=Lombiq.Analyzers)](https://www.nuget.org/packages/Lombiq.Analyzers/)


## About

.NET code analyzers and code convention settings for [Lombiq](https://lombiq.com) projects, predominantly for [Orchard Core](https://www.orchardcore.net/) apps but also any .NET apps. We use these to enforce common standards across all our .NET projects, including e.g. all of our [open-source Orchard Core extensions](https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions). If you contribute to our open-source projects while using that solution you'll be guided by these rules, too. You can check out a demo video of the project [here](https://www.youtube.com/watch?v=dtbGRi3Cezs).
Expand Down
3 changes: 3 additions & 0 deletions build/Lombiq.Analyzers.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Project>
<Import Project="../Build.props"/>
</Project>

0 comments on commit 862d0c8

Please sign in to comment.