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 automation to GoReleaser #984

Merged
merged 14 commits into from
Sep 27, 2023
Merged

Add Winget automation to GoReleaser #984

merged 14 commits into from
Sep 27, 2023

Conversation

tashian
Copy link
Contributor

@tashian tashian commented Jul 17, 2023

This is blocked on goreleaser/goreleaser#4196

To test the Winget package itself:

  • Create a prerelease on this branch
  • Look in the dist folder in the workflow artifacts, for the Winget manifest files
  • Compare them to my hand-crafted winget yaml files for step, make sure all the critical fields are present and populated properly
  • Create a PR on microsoft/winget-pkgs using the yaml files, and see if it passes validations

To test the Winget PR automation:

  • Create a smallstep/winget-pkgs repo that is a fork of microsoft/winget-pkgs.
  • In .goreleaser.yml, set skip_upload: false and then push a pre-release
  • Make sure the generated YAML looks great.
  • See if a PR is created properly in smallstep/winget-pkgs.

Before merging this:

  • Configure .goreleaser.yml to use microsoft/winget-pkgs as the base package (uncomment lines 351-354)
  • Change skip_upload to auto, so that prereleases no longer trigger PRs

@tashian tashian requested a review from dopey July 17, 2023 23:30
@github-actions github-actions bot added the needs triage Waiting for discussion / prioritization by team label Jul 17, 2023
@hslatman hslatman added this to the v0.24.5 milestone Jul 18, 2023
@tashian
Copy link
Contributor Author

tashian commented Aug 22, 2023

this is unblocked.

@tashian tashian marked this pull request as ready for review August 22, 2023 22:40
@tashian
Copy link
Contributor Author

tashian commented Aug 23, 2023

I think the only thing this needs now is for the GH action token to have permission to create a PR on microsoft/winget-pkgs once everything is done. See this error in the action run:

   • winget.pull_request enabled, creating a PR
      • error checking for default branch            projectID= statusCode=404 error=GET https://api.github.com/repos//: 404 Not Found []

EDIT: This turned out to be a GoReleaser bug, which is now fixed and is in the GoReleaser 1.21 milestone (not yet released).

@maraino maraino modified the milestones: v0.25.0, v0.25.1 Sep 27, 2023
@tashian
Copy link
Contributor Author

tashian commented Sep 27, 2023

GoReleaser 1.21 is out, so this is ready for merge

@tashian tashian merged commit 57f839f into master Sep 27, 2023
15 checks passed
@tashian tashian deleted the carl/winget branch September 27, 2023 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Waiting for discussion / prioritization by team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants