Skip to content

Byndyusoft/NetGithubActionsNugetTemplate

Repository files navigation

Template Information (Delete this header before publishing package)

.NET Nuget publishing template

This is a template repository with github actions for .NET nuget packages creation and publishing

How to use:

  • Rename ExampleSolution to your solution name (ExampleSolution => MyPackageSolution)
  • Delete project and add your projects or rename existing projects(ExampleProject => MyPackage). If your IDE does not support folders renaming, you also need to rename folders manually.
  • Change properties in Directory.Build.props file according to your needs (version, package tags, repository url)
  • Fix dotnet-version in .github/workflows/*.yml

How to publish pre-release to nuget.org:

Mark This is a pre-release checkbox when you create a release.

image

The package version will be <proj_version>-tags-<tag_name> where proj_version is retrieved from .csproj or Directory.Build.props file.

Publishing README on Nuget

If you want to publish README on Nuget add this in package csproj file

<ItemGroup>
    <None Include="..\..\README.md" Pack="true" PackagePath="\"/>
</ItemGroup>

License

ExampleProject NugetDownloads

Package description

Installing

dotnet add package ExampleProject

Usage

Usage description

  TODO

ExampleProject.SecondPackage NugetDownloads

Package description

Installing

dotnet add package ExampleProject.SecondPackage

Usage

Usage description

  TODO

Contributing

To contribute, you will need to setup your local environment, see prerequisites. For the contribution and workflow guide, see package development lifecycle.

Prerequisites

Make sure you have installed all of the following prerequisites on your development machine:

Package development lifecycle

  • Implement package logic in src
  • Add or adapt unit-tests (prefer before and simultaneously with coding) in tests
  • Add or change the documentation as needed
  • Open pull request in the correct branch. Target the project's master branch

Maintainers

github.maintain@byndyusoft.com