Publish a .NET Console App to Chocolatey using GitHub Actions

What to distribute?

dotnet publish MySoltutionName -c Release -r win-x64 /p:PublishSingleFile=true /p:CopyOutputSymbolsToPublishDirectory=false — self-contained false -o ./output

Version number

Increase minor version with each post (through PR) to the main branch

Release notes

Example release notes for a specific version, including links to the PR

Releases

See the latest release on your GitHub repo start page
The release notes and the assets for a specific version

Creating the Chocolatey Package

Nuget fragment for the DocFx Companion Tools
The chocolateyinstall.ps1 for DocFx Companion Tools

Publishing the Chocolatey Package

choco pack <nuspec-file>

choco apiKey -k <API Key> -source https://push.chocolatey.org/

choco push <package>

Installing the package using Chocolatey

choco install docfx-companion-tools

Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store