-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 github action to submit a PR when a release is created #1515
Comments
That's what we do internally already for a selected set of applications:
More are planned, however the ones listed above are already fully automated (even the PR creation). |
@SoftCreatR Can you share any more about your current work in this area? |
@JamieMagee Well, I'm simply obtaining the current version numbers from the supported applications, compare them with the existing ones and if needed, download the executable, calculate it's hash and create a PR, using the official GitHub API. Every covered application has a Manifest Template that is used upon release creation to guarantee consistency. Before doing a first release, a manual validation will be performed on a HyperV machine. Everything else is done on a small Linux machine. However, I've planned to move to a Windows server, so all the validation stuff can be automated, too. At the end, all I have to do to support an application is to provide the logic to get the current version number and a download link. Everything else is generic. But as a result, I can provide updates in realtime (within 5 minutes after official release) without any additional work 🥰 EDIT: There was a small update at our end that fixes #91 for now by providing a simple proxy. This allows us to provide more packages like HeidiSQL (see #1610), MEGASync (see #1620) and others, where the validation is currently failing due to the range request bug. However, the proxy isn't meant to be used by everyone, so a secret (per download url) is required in order to download a file using the proxy. An example url would be: In this example, a version parameter has been appended. This allows us to save/cache the executable This solution is a temporary one and lasts, until the bug has been fixed. |
@SoftCreatR Thanks for the explanation, but I think I'm still missing something. Where are you getting this version information from? Is it a manual process or are you using something like Repology? Additionally, does winget.it just proxy requests to the actual download URL due to the bug about range requests? |
We are not using any external/additional service to obtain version informations. I was considering to use one, but then decided to do this "manually". Most times (when there's no public information or a Git repository) we analyze the application's traffic and try to find, how they know about new versions. If that's not possible, we'll create alternative ways.
Yes and no. The server itself automatically builds the manifest files, if there's an update of an application and finally creates a PR for the generated manifest files. However, that should not the only reason to pay for the server, so i've just created a website at https://www.winget.it, which also acts as "web directory" for winget manifests. I had some fun creating a website that looks and behaves like the Windows Terminal (or the classic PowerShell that can be selected from the settings that are hidden behind the Last but not least, there's the proxy thing as mentioned above. Like I said, it's a temporary solution around the range request bug. As of now, it downloads the requested binary, stores it on the server and delivers it from here. The rest is just a matter of proper webserver configuration. |
Just a quick heads up: We've just set up a list that shows, which applications are covered by our automation (Version check, Manifest and PR creation), : https://www.winget.it/auto It's not finished yet, but it already contains the most important informations. |
@SoftCreatR The auto link seems to be broken, any chance you can give the updated list? And how can we get our application covered by your automation? |
I'm no longer active here, that's why I've abandoned the whole website, sorry. |
@JohnMcPMS I am the author of the Automatic Winget pkg update issue on the cli/cli for the new gh cli as mentioned by @alannt777. I was wondering if there has been any update on someone working on this since I was planning to work on this to help with the cli update and was planning on working on it. If there is someone working on this please let me know, if not let me know if there are any requirements decided by Microsoft since I was planning on working on it. |
@Vishesh-Gupta , I don't believe that we have anyone actively working on it, although I believe that the VS Code team may have created one for their own purposes. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
We've released wingetcretae and have examples of using GitHub actions to publish manifests as PRs. |
I have created https://github.com/vedantmgoyal2009/winget-pkgs-automation for auto-updating manifests for packages that are delivered through GitHub releases. Currently, there are only a few packages but Levvie has provided me with a long list of packages (vedantmgoyal9/vedantmgoyal9#1 (comment)) which I will be adding soon to the automation. |
Related to having packaged actions: microsoft/winget-create#160 |
Also, not that it helps, but here's an example of a GitLab CI job that automatically posts PRs (via running the wingetcreate.exe file in a Windows Docker container): https://github.com/DataDog/datadog-agent/blob/main/.gitlab/deploy_7/winget.yml. |
PowerToys has automated their manifest publishing with the Windows Package Manager Manifest Creator. |
@Trenly this one specifically mentions about a GitHub Actions, whereas, the other one talks about automation in winget-pkgs itself. |
I think I agree with @vedantmgoyal2009 here. I think the other one is also related to: I've been discussing ways we could fully incorporate @vedantmgoyal's other project in winget-pkgs directly so we can easily reason about what is automated, and look at further enhancements for other mechanisms of detecting upgrades and updating manifests. Sadly, it's a prioritization challenge, and a concern about honoring publisher wishes. I still believe it's in a publisher's best interest to submit their own manifests which is why a GitHub action looks like one of the good mechanisms to do this leveraging wingetcreate. When that isn't an option some kind of responsible polling mechanism seems to be the second-best option. |
I'm currently just rolling my own implementation: |
Here are a couple of other examples using wingetcreate: |
Description of the new feature/enhancement
A GitHub Action placed in the marketplace that would submit a PR when a release is created could make keeping open source projects up to date in this repo very easy.
Proposed technical implementation details (optional)
I have no idea if an action actually supports that 😉 It would need to be able to:
The text was updated successfully, but these errors were encountered: