-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
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.
/cc @nodejs/releasers @nodejs/build |
Neither the Build WG nor releasers have authority to create repository secrets for this repository -- that would fall under @nodejs/tsc. |
Perhaps @mhdawson? |
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. |
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm checking on a personal repository, will share the results soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, good to know. Thanks for investigating this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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 |
Is this ready to land? |
I would like to ping @nodejs/build to review. |
@bzoz what's your preferred channel to share the secrets so I can add it to the repo? |
@mmarchini shouldn't the build team create that machine account? |
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). |
Yeah, sorry I didn't make that more clear. A GitHub user with a fork of the winget packages repo is needed. |
Ok, we'll just use the @nodejs-github-bot then. I assume it's fine for the fork to live on the |
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