publish to windows winget package manager
felixsanz opened this issue · 2 comments
can you publish on winget package manager please?
I was doing a bit of reading to figure out what needs to be done for this and man why are these package managers always such a pain to publish to. Anyway, a rough outline of what I found so far:
-
We need an installer and wix seems to be a common one. Conveniently,
cargo-wix
exists which helps a lot and just runningcargo wix init
andcargo wix
builds you an installer.For this you need
choco install wixtoolset -y
and might needdotnet tool install --global wix
. -
I looked into NuShell to see how they do it and their release job is pretty simple.
-
This release job assumes the installer files are present in the GitHub release. You are already doing roughly what is needed in the
create-draft-release-with-artifacts
CI job, I think if we rancargo-wix
here to generate the installer and add it to the release assets it "should all work fine with zero problems✨" which is always how these things go right :)
Also do note that wingetcreate update
needs a version to be published beforehand so even if we implemented this now, we would only be able to test the CD job a release later (of course you could also just bump the patch version for the sake of testing).
Lastly, it seems that you can publish installers for all OSes on Winget? Not sure if that's actually the case but also not sure if it would be worth the extra hassle since ouch is already published for a plethora of Linux distros and I doubt anyone not on Windows would use Winget.
It also seems like NuShell has had issues with their CD job because of their binaries being renamed accidentally at one point or another which were apparently hard to debug, it might be a good idea to add sanity checks to prevent this (maybe log errors with something like this?).
can you publish on winget package manager please?
It might be surprising, but Ouch maintainers didn't create a single package for Ouch! That was all done by random people who wanted to help. <3
Thank you so much for the info @AntoniosBarotsis, I'll mark this as "PR-welcome" for anyone who wants to tackle it.
Note: I don't own a Windows environment so I'd expect whoever is making this PR to "check if it works" for us, if it isn't much to ask, also check if it keeps working after the very next Ouch update.