-
-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Create Github Action to release winget package #1618
Conversation
Following issue f3d-app#221 Uses [winget-releaser](https://github.com/vedantmgoyal9/winget-releaser) I suggest a `Classic Github Token` with `public_repo` scope is created by f3d-app org or another maintainer, following [this link](https://github.com/settings/tokens/new), then the Token can be added to the triplex repo as a secret named `WINGET_ACC_TOKEN`. See below, that user also will have to fork the winget-pkgs repository. Notes: > You will need to create a *classic* Personal Access Token (PAT) with `public_repo` scope. New fine-grained PATs aren't supported by the action. Review f3d-app#172 for information. > Fork [microsoft/winget-pkgs](https://github.com/microsoft/winget-pkgs) under the same account/organization as the project's repository. If you are forking winget-pkgs on a different account (e.g. bot/personal account), you can use the fork-user input to specify the username of the account where the fork is present.
While I'm not against this, I fail to undersand why does we (the F3D maintainers and contributors) should be responsible to upload a binary to yet another package system. Why cant winget packager/logic grab it instead ? Is there a documentation about the winget workflow and how it is supposed to work ? |
Also, can/should we upload the nightly too ? |
The winget-pkgs is a community repository, so anyone can create a manifest for a package - which references the package name, author, installer url etc - for others to install via the The automation to upload the new installer to winget-pkgs on every release usually happens on the original repo - around 200k PRs, to get an overview of the approximate count of packages hosted in this community repository - so they don't have to watch every release of every package - especially since the packages that use github release are only a portion of the standard winget packages. The github action are the way to do it, but usually involve simply forking the repo, and using the winget-releaser action to create the new PRs automatically. Here is a bit of context in another repo - this resource is a pretty good intro to winget |
Thanks for the explanation. It happens that our binaries are created by a dedicated release workflow in another repository. I think the action you are adding would be more at home there instead of relying on the |
Thanks for mentioning f3d-superbuild. Usually, the winget-releaser workflow actions are setup on the repo where the release contains the exe or installers, watching for the release. I've not seen example of actions where the installer files generated by the build CI are actually used within a subsequent job of the action. |
F3D is different than many other repos as the binary package is not generated manually or from the repo itself but from another repo, the superbuild. This repository is also responsible for generating our python wheels and publishing them on pypi. It seems logical that the winget package would be uploaded from there too imo, and at the same time. |
Understood. One thing I forgot to mention, the package manifests references the installer (or portable exe) url, so that every client machine that do run So even if the github action is moved outside to f3d-suprebuild, it would reference the installer exe url that resides in https://github.com/f3d-app/f3d/releases/ |
I'm not sure to follow, when a user do |
The package manifests are stored on the community repository - and the indexes are usually updated on each machine. So when the user runs |
Ha! So this action does not even uploads the binary package, but just reference a link to it? |
Yep exactly! |
Then that looks fine to merge imo. Thanks for the explanation. |
The PRs to update the package identifier on winget-pkgs have been merged, so now it can be installed via winget source update
winget install f3d-app.f3d |
Ill merge this as soon as I find the time to create the token |
@jo-chemla the winget package CI failed for 3.0, wanna take a look ? https://github.com/f3d-app/f3d/actions/runs/12852778924/job/35835166416 |
Hi there, only thing I can see is the regex was maybe wrong, see the suggested edits in PR |
Ah, just saw the run logs, seems that the github personal access token you provided does not let the CI make a fork, probably the authorizations are not set the correct way? You have that PAT to allow forks. |
Yeah, I forgot this and need to take a look |
So I think I did whats needed, I've added a PAT, I've created a fork, its still not working. Do you have any idea @jo-chemla ? |
Sorry, from the docs it seems that Komac and winget-releaser@v2 users need a classic github api token rather than the new PAT for the action to run properly.
The latest execution of the github action is last week Jan 20, after the also failed Jan 19. Seems the error is |
Following issue #221 Uses winget-releaser I suggest a
Classic Github Token
withpublic_repo
scope is created by f3d-app org or another maintainer, following this link, then the Token can be added to the f3d repo as a secret namedWINGET_ACC_TOKEN
. See below, that user also will have to fork the winget-pkgs repository.Notes: