This repo contains the source for various Chocolatey packages
- Change the files
- Build the package: choco pack
- Test the package (as administrator): choco install [packageName] -dv -s .
- Create a Chocolatey account
- Create an API key in the [account] (https://community.chocolatey.org/account)
- Optionally, for creating packages local, configure the [API key] (https://docs.chocolatey.org/en-us/create/commands/api-key), then inside the directory of the package execute
choco packto package the nupkg andchoco pushto push the package to the Chocolatey server. - Create some public Git repository with a directory for the package, or copy one of my existing directories to your repository
- For GitHub actions configure an [environment] (https://github.com/johanjanssen/ChocolateyPackages/settings/environments) for example called
Push-Packageswith the environment secretCHOCOLATEY_API_KEY - Now create GitHub workflows, such as for example the ones I used.
- Note that the
update-chocolatey-packages.ymlonly works to automatically update some packages, details can be found in the updater folder. For example it doesn't work for Microsoft packages as I couldn't find an API to automate the process, nowadays the [Disco API] (https://github.com/foojayio/discoapi) could be used. - To manually update an existing package:
- Change the
versionfield in the*.nuspecfile - Change the
urlandchecksumin thechocolateyinstall.ps1in thetoolsdirectory for MSI files - Alternatively, change all the *.ps1 files in the
toolsdirectory for zip files
- Change the
- To create new packages
- Copy an existing package directory
- Change the
id,version,packageSourceUrlandtitleand other fields if needed in the*.nuspecfile. I also recommend changing the name of the*.nuspecfile, so it's easier to recognize in an editor when you're working on multiple packages - Change the
urlandchecksumin thechocolateyinstall.ps1in thetoolsdirectory for MSI files - Alternatively, change all the *.ps1 files in the
toolsdirectory for zip files
- Packages are approved by moderators, if packages are trusted this goes automatically. If a package is not trusted it can take some time.