Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create winget package #3425

Closed
knolljo opened this issue Dec 9, 2024 · 9 comments · Fixed by microsoft/winget-pkgs#197444
Closed

Create winget package #3425

knolljo opened this issue Dec 9, 2024 · 9 comments · Fixed by microsoft/winget-pkgs#197444

Comments

@knolljo
Copy link

knolljo commented Dec 9, 2024

In Windows there is a way to install packages like on most linux distros with a package manager. It's called winget and is officially supported by Microsoft.

Offering mise to be installed via winget would make the distribution on Windows much easier.

If there is interest in this, I could contribute to it.
Creating a package is pretty straight forward with winget-create.

@jdx
Copy link
Owner

jdx commented Dec 9, 2024

yeah this just hasn't happened yet because I don't know how to do it, some help would be great. Even if you could just give me a script to build it I could do the work of integrating it into the release process

@knolljo
Copy link
Author

knolljo commented Dec 9, 2024

After some research I found Komac, which seems to be used by a lot of rust based projects like gitui orjust.

It provides a GitHub Action.

@knolljo
Copy link
Author

knolljo commented Dec 9, 2024

This Repo might be a good starting point to implement your own Gh-Workflow.

@jdx
Copy link
Owner

jdx commented Dec 9, 2024

unrelated: seems like a tool we should add to the registry

I think the best way to integrate it would be to add it to build-tarball.ps1

Then I think we just need to modify this to add it as an asset:

- uses: actions/upload-artifact@v4
with:
name: tarball-${{matrix.target}}
path: dist/*.zip
if-no-files-found: error

And then it needs to be published to s3 and the github release, and I assume to WinGet after that.

I will probably have some time to get around to this at some point, but it involves dusting off my windows laptop so idk when. My gut says the stock github-action wouldn't work well with the existing release infra.

@knolljo
Copy link
Author

knolljo commented Dec 9, 2024

This tool would definitely make a fine addition to the tool collection!

Afaik the publishing process to winget is just a pull request to the official winget-pkgs repo with some manifest files for a package.

These manifests include the location where to pull the exe/installer from, for most packages it is the GH Releases page. The Action could do a pull request to winget-pkgs automatically for each release.

It is also possible to create an external repo that periodically checks the Releases page for mise and updates the manifest on a change.

I have a Windows machine ready, lmk if i can help.

@jdx
Copy link
Owner

jdx commented Dec 9, 2024

you should be able to just run that ps file if you clone this repo, e.g.: pwsh scripts/build-tarball.ps1. Assuming that works, then just add komac and build the installer in that script and submit a PR.

@jdx
Copy link
Owner

jdx commented Dec 10, 2024

so I went ahead and made a pr with komac and it seems to work locally for me, but the CI suite failed in the PR and I don't even see an error message so I'm not sure what to do at this point

@jdx
Copy link
Owner

jdx commented Dec 10, 2024

oh nice, I was exploring scoop as an alternative but someone beat me to it ScoopInstaller/Main#6374

@andrewcrook
Copy link

Chocolatey is another

@jdx jdx closed this as completed Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@jdx @andrewcrook @knolljo and others