32
loading...
This website collects cookies to deliver better user experience
.nupkg
file and upload this file on NuGet website! Here is following steps for releasing my application: <propertyGroup>
project file (.csproj)
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>kimchi_ssg</RootNamespace>
<PackAsTool>true</PackAsTool>
<PackageId>Kimchi-ssg</PackageId>
<Version>1.0.1</Version>
<Authors>Minsu Kim</Authors>
<IsPackable>true</IsPackable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Description>Simple .NET application to generate static HTML file(s) from text and MarkDown</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/mkim219/kimchi-ssg</PackageProjectUrl>
</PropertyGroup>
.nupkg
file, <IsPackable>true</IsPackable>
is required to generate .nupkg
fileThere is two ways to generate .nupkg
file
Build > Pack {Your application}
on Visual Studiodotnet pack {C# project file}
in CLI. More detail please refer this page https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-pack
On the CLI, the successful message indicates the path where the .nupkg
file is created
Go to Nuget and create account
Go to Nuget Upload after login
Upload .nupkg
!
setting > secrets > add new repository secret
that I can use in CI. .yml
file- name: publish on version change
id: publish_nuget
uses: rohith/publish-nuget@v2
with:
PROJECT_FILE_PATH: ./kimchi-ssg/kimchi-ssg.csproj
PACKAGE_NAME: Kimchi-ssg
VERSION_REGEX: '^\s*<Version>(.*)<\/Version>\s*$'
NUGET_KEY: ${{secrets.KIMCHI_SSG_NUGET_KEY}}
README.md
is unclear and vague. I have fixed the issue that happen in the Linux environment and README.md
to make more understandable to reader.dotnet tool install --global Kimchi-ssg --version 1.0.3
.