Uh oh!
There was an error while loading. Please reload this page.
build: automate winget package creation - #34014
Conversation
Add GitHub action that will automatically create a PR adding new Node installers to the winget-pckg repository.
bzoz
commented
Jun 22, 2020
/cc @nodejs/releasers @nodejs/build |
richardlau
commented
Jun 22, 2020
Neither the Build WG nor releasers have authority to create repository secrets for this repository -- that would fall under @nodejs/tsc. |
Trott
commented
Jun 23, 2020
Perhaps @mhdawson? |
mmarchini
commented
Jul 26, 2020
I opened a request on nodejs/admin, once the request is approved as per our policy I can help setup the secrets in this repository. |
mmarchini
commented
Aug 19, 2020
@bzoz the request to add secrets to the repo was approved, feel free to ping me once this is ready to land to help setup secrets in the repo. @nodejs/build this need reviewers. |
| on: | ||
| release: | ||
| types: [published] |
There was a problem hiding this comment.
Just a quick note on expectations: I'm pretty sure this will only land if the published tag includes this file, which means once it lands we should backport it to every active major.
There was a problem hiding this comment.
This file only needs to be in master, it will work for all published tags. The script also works if it is called from other repos (like this PR made from this release in my fork)
There was a problem hiding this comment.
Interesting, that's quite inconsistent with how other Actions events work, but if it works it works :)
(just a note, on the release in your fork the file exists in the release, so that's not a valid test to see if it works with the file only on master)
There was a problem hiding this comment.
You've got a point there, I'll check it out. I've written the script some time ago, might as well check if it still works.
There was a problem hiding this comment.
I'm checking on a personal repository, will share the results soon
There was a problem hiding this comment.
It only runs if the action exists in the release, I pushed a simple action that runs on publish, then I published 0.0.2 from master, which triggered the run, and then I published 0.0.1 from the commit right before the action was added, which didn't trigger the run.
Actions have weird semantics sometimes.
There was a problem hiding this comment.
Huh, good to know. Thanks for investigating this.
There was a problem hiding this comment.
No problem. Also, this doesn't block or affect this PR, it's just a heads up of what we need to do once we land it.
bzoz
commented
Aug 20, 2020
Verified, the script still works. It creates PRs: microsoft/winget-pkgs#3157 and stops if package with the given version is already there: https://github.com/bzoz/node/runs/1007269352?check_suite_focus=true |
aduh95
commented
Nov 8, 2020
Is this ready to land? |
PoojaDurgad
commented
Dec 24, 2020
I would like to ping @nodejs/build to review. |
nodejs-github-bot
commented
Dec 28, 2020
mmarchini
commented
Jan 5, 2021
@bzoz what's your preferred channel to share the secrets so I can add it to the repo? |
bzoz
commented
Jan 5, 2021
@mmarchini shouldn't the build team create that machine account? |
mmarchini
commented
Jan 5, 2021
When you say a "machine account", do you mean a GitHub bot account like @nodejs-github-bot? Reading the description I assumed it was a Microsoft publisher account on Azure or smth (no idea if that even exists, I'm not familiar with Windows ecosystem). |
bzoz
commented
Jan 5, 2021
Yeah, sorry I didn't make that more clear. A GitHub user with a fork of the winget packages repo is needed. |
mmarchini
commented
Jan 5, 2021
Ok, we'll just use the @nodejs-github-bot then. I assume it's fine for the fork to live on the |
bzoz
commented
Jan 5, 2021
mmarchini
commented
Jan 5, 2021
humm, ok, let's create the fork on @nodejs-github-bot for now and if it becomes a pain to manage we can move it to the foundation and make the necessary changes to the Action. |
This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open. |
Closing this because it has stalled. Feel free to reopen if this issue/PR is still relevant, or to ping the collaborator who labelled it stalled if you have any questions. |
Add GitHub action that will automatically create a PR adding new Node installers to the winget-pckg repository.
The action is triggered when a new GitHub release is made. At this point, the new installer should already be published. The script will:
The action requires some outside setup. A machine user needs to be created and have a fork of the microsft/winget-pckg repository. The machine user PAT, email, etc. need to be added as repository secrets.
One thing we might want to customize more is the license and description fields. For now I went with:
Ref: nodejs/Release#587
Checklist