This is a template for a .Net library project. The main idea is to provide convenient preconfigured project structure that would utilize Github Flow for development process and Conventional Commits for semantic versioning and generating a change log.
- GitHub Actions
- When PR is opened, run tests and lint commit messages for Conventional Commits standards
- When PR is merged, run tests, publish to NuGet, update the changelog file and create GitHub release while using GitVersion to figure out the next version. GitVersion is configured to use Conventional Commits to figure out the next release version.
 
- Preconfigured StyleCop rules
- Pre-Commit configuration and scripts to install the tool and it's hooks
- Scripts to install dependencies so development can be started quicker
- Sample Guard utility class for validation
- .NET SDK as defined in global.json
- PowerShell on Windows for running the helper scripts
- Python for installing and running pre-commit
- Create a GitHub repository with this project as its template
- Run install-dependencies(.ps1on Windows or.shon Linux). It installs the right .NET SDK,dotnet-formatand sets uppre-commit
- Create a NuGet API key and set it in the repository secretsasNUGET_TOKEN
- Replace COMPANY-PLACEHOLDERinstylecop.jsonwith your company or project name
- Replace COMPANY-PLACEHOLDERvalues inDirectory.Build.propswith the same value
- If you use a different strong name key, update strongname.snkandAssemblyInfo.csaccordingly
For testing you may want to publish the package without waiting for the merge workflow. Pack and push the project manually:
dotnet pack -c Release
dotnet nuget push "bin/Packages/Release/*.nupkg" -k <API_KEY> -s https://api.nuget.org/v3/index.json