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

Publish to Windows Package Managar (WinGet) #3071

Open
vedantmgoyal9 opened this issue Aug 17, 2022 · 10 comments
Open

Publish to Windows Package Managar (WinGet) #3071

vedantmgoyal9 opened this issue Aug 17, 2022 · 10 comments
Labels
enhancement Issues that enhance the code or documentation of the repo in any way

Comments

@vedantmgoyal9
Copy link

vedantmgoyal9 commented Aug 17, 2022

With every new release of Temurin JDKs/JREs, use a GitHub workflow to update manifests at https://github.com/microsoft/winget-pkgs repository.

The workflow will be added to every release repository:

Prerequisites:

  1. https://github.com/microsoft/winget-pkgs will be required to be cloned under the organization or a personal account of a maintainer/bot like @eclipse-temurin-bot.
  2. A GitHub Personal Access Token (PAT) will be needed to create pull requests to update manifests at https://github.com/microsoft/winget-pkgs. The token needs to be added as a repository secret to every repo. I know it's a bit hectic but it needs to be done only one time ;) Permissions required: public_repo and workflow.

Existing projects which use the action: https://github.com/search?q=vedantmgoyal2009%2Fwinget-releaser+path%3A.github%2Fworkflows%2F+language%3AYAML&type=Code&s=indexed&o=desc

P.S. I can create PRs for every repository.

Edit: Replaced extraneous reference of temurin18 with temurin19 (beta).

@vedantmgoyal9 vedantmgoyal9 added the enhancement Issues that enhance the code or documentation of the repo in any way label Aug 17, 2022
@zdtsw
Copy link
Contributor

zdtsw commented Aug 22, 2022

I made a draft on jdk11, if this is what you want? @vedantmgoyal2009
I am thinking only for the official releases and skip nightly builds, which only enable jdk8/11/17/19(tobe)

@vedantmgoyal9
Copy link
Author

I've updated to add JRE too.

@zdtsw
Copy link
Contributor

zdtsw commented Aug 23, 2022

ping @gdams and @karianna for this issue

@sxa
Copy link
Member

sxa commented Sep 7, 2022

Any thoughts @gdams @karianna - are MSFT willing to support this?

@gdams
Copy link
Member

gdams commented Sep 8, 2022

This seems like the logical thing to do here. The manifests are currently being manually updated although it's not something that I've been doing myself.

I would say let's role this out for the 8-18 repos and see how stable it is

@vedantmgoyal9
Copy link
Author

@gdams The internal CI which publishes GitHub releases can trigger the WinGet workflow programmatically after all 4 binaries have been published (JDK/JRE x64/x86) and pass the GitHub release tag with it (see https://docs.github.com/en/rest/actions/workflows#create-a-workflow-dispatch-event to how to do it).

References:
2. Docs about workflow_dispatch event: https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
3. Updates to workflow_dispatch: https://github.blog/changelog/2022-06-10-github-actions-inputs-unified-across-manual-and-reusable-workflows/

@vedantmgoyal9
Copy link
Author

@gdams @karianna From some discussion in adoptium/temurin11-binaries#11, I came to know that not all binaries are published along with the release. So, we might want to trigger the WinGet workflow from the internal CI which uploads Windows MSI binaries to GitHub.

Use GitHub CLI to create workflow_dispatch event: https://cli.github.com/manual/gh_workflow_run (we need to pass release tag to workflow, which we can do via JSON standard input, as mentioned in the docs)

Main Documentation: https://docs.github.com/en/rest/actions/workflows#create-a-workflow-dispatch-event

References:

  1. Docs about workflow_dispatch event: https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
  2. Updates to workflow_dispatch: https://github.blog/changelog/2022-06-10-github-actions-inputs-unified-across-manual-and-reusable-workflows/

@friesoft
Copy link

Any progress on this? Using winget the latest versions are currently not available and therefore contain open CVEs (CVSS 7,5 iirc).

@karianna
Copy link
Contributor

@gdams Let's discuss when we next meet up - not sure where this is these days.

@gdams
Copy link
Member

gdams commented Oct 29, 2024

I think this certainly makes sense to me. We'd have to ensure that the workflow supports multiarch packages (x64 and ARM64)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues that enhance the code or documentation of the repo in any way
Projects
Status: Todo
Development

No branches or pull requests

6 participants