How to create a Chocolatey package for an exe or golang release
Channel: ItsIgnacioPortal
Date: 11/08/2022

This tutorial is for creating and publishing a chocolatey package into the community repository. Note that if you need to setup registry keys, shortcuts, or folder permissions, you should modify the installer and uninstaller scripts to deal with that. This guide is aimed at standalone executables.

You might see me use commands such as "rm" and "whereis"; these commands are from cygwin (https://cygwin.com/) so they probably won't work for you. Instead of "rm" you can use "del" to delete files.


COMMANDS:

choco new --name="mycoolproject" --version="1.0.0" --maintaner="cooldude34" maintainername="cooldude34" --out="choco"
cd choco\mycoolproject\tools
del chocolateyuninstall.ps1
del chocolateybeforemodify.ps1
cd ..
del ReadMe.md
del _TODO.txt
choco pack
choco install mycoolproject.1.0.0.nupkg
choco uninstall mycoolproject

Create an account for Chocolatey: https://community.chocolatey.org/packages
Publish your package: https://community.chocolatey.org/account
False-Positive-Center: https://github.com/yaronelh/False-Positive-Center

TEMPLATE for chocolateyinstall.ps1:
https://pastebin.com/DUaNxPXs
https://www96.zippyshare.com/v/sEUMMFI8/file.html
https://mega.nz/file/85h01AKD#CoJOYiCCUMBlFAEbVKvzUn7E0i3XQ1Z2JPSSeqaUhZw

Official Chocolatey documentation:
https://docs.chocolatey.org/en-us/create/create-packages
https://docs.chocolatey.org/en-us/create/commands/push
https://docs.chocolatey.org/en-us/choco/commands/install