James Skemp fbf6338e02 | ||
---|---|---|
.gitignore | ||
Class1.cs | ||
README.md | ||
dotnet-package.csproj |
README.md
.NET Package
dotnet new classlib
dotnet new gitignore
Add the following to the .csproj file:
<PackageId>strivinglife.2023.03.08.001</PackageId>
<Version>1.0.0</Version>
<Authors>James Skemp</Authors>
<Company>James Skemp</Company>
dotnet pack
Add the following to the .csproj file so it's automatically packed on build:
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
dotnet build
# Add Gitea as a source.
dotnet nuget add source --name {source_name} --username {username} --password {password} https://gitea.example.com/api/packages/{owner}/nuget/index.json
# Publish the package.
dotnet nuget push --source {source_name} {package_file}