Go to file
James Skemp fbf6338e02 Add initial version 2023-03-08 20:28:11 -06:00
.gitignore Add initial version 2023-03-08 20:28:11 -06:00
Class1.cs Add initial version 2023-03-08 20:28:11 -06:00
README.md Add initial version 2023-03-08 20:28:11 -06:00
dotnet-package.csproj Add initial version 2023-03-08 20:28:11 -06:00

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}