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) #2199

Closed
wants to merge 1 commit into from
Closed

Publish to Windows Package Managar (WinGet) #2199

wants to merge 1 commit into from

Conversation

vedantmgoyal9
Copy link

This action automatically generates manifests for WinGet Community Repository (microsoft/winget-pkgs) and submits them.

Before merging this:

  1. Please add a GitHub token with public_repo scope as a repository secret and rename the secret name in the workflow.
  2. Fork microsoft/winget-pkgs under @wez.
  3. Publish releases using a PAT and not GitHub Actions.
    image

@wez
Copy link
Owner

wez commented Jun 28, 2022

Thanks for this!

Please don't take this personally, but I don't feel comfortable running this action directly with my PAT. I feel more comfortable forking it and referencing that fork.

That said: I took a look through the action and amazed by the amount of code that it takes to produce a PR like https://github.com/microsoft/winget-pkgs/pull/64366/files

It feels like, for wezterm at least, that a relatively simple shell script that uses the gh CLI could be used to create those three files and create a PR. Have you considered something like that in the past?

I'd feel much more comfortable having that simpler logic here in the wezterm repo as it reduces concerns about the PAT "escaping" and the code would be much easier to follow.

What do you think?

@vedantmgoyal9
Copy link
Author

vedantmgoyal9 commented Jun 28, 2022

Thanks for this!

Please don't take this personally, but I don't feel comfortable running this action directly with my PAT. I feel more comfortable forking it and referencing that fork.

You can simply fork my action repository: https://github.com/vedantmgoyal2009/winget-releaser, and change uses: parameter to wez/winget-releaser@latest. The rest of the process would remain same, and the source code of the action will be in your hands.

That said: I took a look through the action and amazed by the amount of code that it takes to produce a PR like https://github.com/microsoft/winget-pkgs/pull/64366/files

It feels like, for wezterm at least, that a relatively simple shell script that uses the gh CLI could be used to create those three files and create a PR. Have you considered something like that in the past?

I'd feel much more comfortable having that simpler logic here in the wezterm repo as it reduces concerns about the PAT "escaping" and the code would be much easier to follow.

What do you think?

The script already uses GH CLI: https://github.com/vedantmgoyal2009/winget-releaser/blob/main/YamlCreate.ps1#L1134

@wez
Copy link
Owner

wez commented Jun 28, 2022

Publish releases using a PAT and not GitHub Actions.

I'm not sure what this means; today I make releases by pushing a tag and leaving it up to my GH actions to create the actual release as a pre-release/draft.
Later, I manually set the release as released.

Is that compatible with this?

wez added a commit that referenced this pull request Jun 28, 2022
A slightly simpler alternative to #2199
@wez
Copy link
Owner

wez commented Jun 28, 2022

What do think about 40d346b which a first pass over integrating a winget upload more closely to the release asset upload?

@vedantmgoyal9
Copy link
Author

You'll have to publish the release immediately since draft releases do not expose binaries' URLs to the public.

I'm not much familiar with bash, but according to my little knowledge, it looks good. Rest we can wait until you publish a new release and test the script.

@vedantmgoyal9
Copy link
Author

I'm closing this pull request in favor of the script.

@russellbanks
Copy link

russellbanks commented Aug 7, 2022

I would still argue that the winget releaser action is preferable because it will require less effort on your part to maintain (new manifest versions, etc). It makes more sense to use the yamlcreate script rather than hardcode most of the values. Also, there are toggleable features with winget releaser, like only keeping the latest version, etc

Publish releases using a PAT and not GitHub Actions.

I'm not sure what this means

You provide a token from your account and winget releaser makes the PR on your behalf, like your script is doing

@wez
Copy link
Owner

wez commented Aug 7, 2022

microsoft/winget-pkgs#68991 seems to have been submitted correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants