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

Add Winget Releaser workflow #2036

Merged
merged 4 commits into from
Apr 12, 2023
Merged

Add Winget Releaser workflow #2036

merged 4 commits into from
Apr 12, 2023

Conversation

sitiom
Copy link
Contributor

@sitiom sitiom commented Feb 18, 2023

PR Summary

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

Before merging this:

  1. Add a classic PAT with public_repo scope as a repository secret named WINGET_TOKEN.

example

  1. Fork https://github.com/microsoft/winget-pkgs under @PowerShell and make sure the PAT has access to it. The action will use that fork for making a branch and creating a PR with the upstream winget-pkgs repository on every release.
  2. Install Pull on the winget-pkgs fork to ensure that it is constantly updated.

You can test out the action inputs in this playground.

If you want to see an example of a PR created using this action, see microsoft/winget-pkgs/pulls (Pull request has been created with WinGet Releaser).

PR Context

@sitiom
Copy link
Contributor Author

sitiom commented Feb 22, 2023

@tgauth Bump

@tgauth
Copy link
Collaborator

tgauth commented Feb 22, 2023

Thanks for working on this @sitiom

I saw that microsoft/winget-pkgs#97126 uses WinGet Releaser v2 but microsoft/winget-pkgs#97419 uses Komac v1.0.5.

Just curious why microsoft/winget-pkgs#97419 was created with Komac v1.0.5, rather than WinGet Releaser v2, if this workflow uses WinGet Releaser v2?

It looks like WinGet Releaser has similar functionality to WinGet create, where the ReleaseNotes field of the WinGet manifest is not updated, but the ReleaseNotesURL is. I think that's fine, but are there any other limitations that I'm missing?

@sitiom
Copy link
Contributor Author

sitiom commented Feb 23, 2023

I saw that microsoft/winget-pkgs#97126 uses WinGet Releaser v2 but microsoft/winget-pkgs#97419 uses Komac v1.0.5.

Just curious why microsoft/winget-pkgs#97419 was created with Komac v1.0.5, rather than WinGet Releaser v2, if this workflow uses WinGet Releaser v2?

Winget Releaser uses Komac behind the hood. I've made the second PR manually using Komac. In the first PR, I was testing Winget Releaser in my fork.

It looks like WinGet Releaser has similar functionality to WinGet create, where the ReleaseNotes field of the WinGet manifest is not updated, but the ReleaseNotesURL is.

No, they are both updated in Komac/Winget Releaser (https://github.com/microsoft/winget-pkgs/blob/28c8a6a17d7342f0981aa3e37c7c11b8d6965819/manifests/m/Microsoft/OpenSSH/Beta/9.2.0.0/Microsoft.OpenSSH.Beta.locale.en-US.yaml#L25-L36). WingetCreate is the one with the limitation.

I think that's fine, but are there any other limitations that I'm missing?

The biggest difference is that Komac is cross-platform while WingetCreate is not:

@tgauth tgauth merged commit fa80857 into PowerShell:L1-Prod Apr 12, 2023
@sitiom sitiom deleted the winget-releaser branch April 13, 2023 01:59
@sitiom
Copy link
Contributor Author

sitiom commented Apr 13, 2023

@tgauth Did you do the prerequisites in #2036 (comment)? I don't see https://github.com/PowerShell/winget-pkgs. If you plan to use your fork instead, you need to add fork-user: tgauth in the action parameters.

@tgauth
Copy link
Collaborator

tgauth commented Apr 13, 2023

@tgauth Did you do the prerequisites in #2036 (comment)? I don't see https://github.com/PowerShell/winget-pkgs. If you plan to use your fork instead, you need to add fork-user: tgauth in the action parameters.

ah, ok will add that - we're using https://github.com/pwshBot/winget-pkgs

@sitiom
Copy link
Contributor Author

sitiom commented Apr 17, 2023

Works:

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.

None yet

3 participants