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 action for publishing package to WinGet #81

Merged
merged 2 commits into from
Feb 3, 2025

Conversation

mdanish-kh
Copy link
Contributor

@mdanish-kh mdanish-kh commented Jan 31, 2025

This PR proposes to add a GitHub action for submitting the latest stable release to WinGet as it gets published. microsoft/winget-create is used as the tool for submitting the latest package.

Steps needed from maintainers

If the maintainers approve of these changes, they will need to do the following before merging this PR:

  1. Fork microsoft/winget-pkgs under a personal or bot account.
  2. Create a personal access token (classic) with public_repo scope from the user account where the fork exists.
  3. Store the created token in a repository secret with the name WINGET_GITHUB_TOKEN

For reference, maintainers may see similar implemented actions in the following repos:
Terminal, PowerToys, Oh-my-posh, coder/coder

Validation

You can download wingetcreate via https://aka.ms/wingetcreate/latest or winget install wingetcreate and validate that a command such as the following will generate a manifest. I have omitted --submit which would submit a PR to the main repo. You can specify your own fork too for testing with wingetcreate settings command and then use --submit

wingetcreate update HTTPToolKit.HTTPToolKit `
  --version 1.19.4 `
  --urls "https://github.com/httptoolkit/httptoolkit-desktop/releases/download/v1.19.4/HttpToolkit-installer-1.19.4.exe|x64" `
  --token <token>

@CLAassistant
Copy link

CLAassistant commented Jan 31, 2025

CLA assistant check
All committers have signed the CLA.

@mdanish-kh mdanish-kh marked this pull request as draft January 31, 2025 20:42
@mdanish-kh

This comment was marked as resolved.

@mdanish-kh mdanish-kh marked this pull request as ready for review January 31, 2025 21:21
@pimterry pimterry merged commit cfea9a6 into httptoolkit:main Feb 3, 2025
3 checks passed
@pimterry
Copy link
Member

pimterry commented Feb 3, 2025

Thanks @mdanish-kh!

For now, I've created a entire separate github user to hold the forked repo, to limit the classic PAT that's required here. Do you know if GitHub's fine-grained per-repo PATs will be supported in future so that that's not required?

@mdanish-kh mdanish-kh deleted the winget-ci branch February 3, 2025 18:21
@mdanish-kh
Copy link
Contributor Author

Yes, I believe there's an open issue over at winget-create repository tracking this work

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.

Set up CI to publish to WinGet
3 participants