Skip to content

feat: Adding winget to goreleaser - #7620

Closed
pjmagee wants to merge 3 commits into
dagger:mainfrom
pjmagee:goreleaser-winget
Closed

pjmagee wants to merge 3 commits into
dagger:mainfrom
pjmagee:goreleaser-winget

Conversation

@pjmagee

@pjmagee pjmagee commented Jun 11, 2024 •

Copy link
Copy Markdown
Contributor

I strongly believe this would be a perfect replacement for official releases of Dagger on Windows, making the install.ps1 a secondary option (which has the ability for Git Commit installs, or for anyone who is not having WinGet, - but WinGet is the official package manager for windows, and is basically apt-get for Windows

Attempting to solve #6441

This seems like a more Dagger supported method for installation because:

  • Its supported by existing goreleaser
  • It handles the checksum
  • winget allows the portable zip binary
  • It can also handle adding the install to the users PATH via an alias
  • Supports simple uninstall and upgrades of the Cli

I have used the existing package Id that was already found by someone who published the 0.9.6 to Winget, since that time, I have published later versions but it also is a common pattern with winget, Cli tools are having this suffix. I have also added tags which is a supported winget feature

Note: These versions in the screenshot did not come from goreleaser, they're previous releases from me and 1 other contributor

image

Not sure how we can test the goreleaser, I'm not too familiar with that tool

Previous releases look like this, when using the winget tool locally to publish:

wingetcreate update --submit --urls https://dl.dagger.io/dagger/releases/0.11.7/dagger_v0.11.7_windows_amd64.zip https://dl.dagger.io/dagger/releases/0.11.7/dagger_v0.11.7_windows_arm64.zip https://dl.dagger.io/dagger/releases/0.11.7/dagger_v0.11.7_windows_armv7.zip --version 0.11.7 Dagger.Cli

https://github.com/microsoft/winget-pkgs/pulls?q=Dagger.Cli

@pjmagee
pjmagee force-pushed the goreleaser-winget branch from caa7935 to 914da9d Compare June 13, 2024 22:53
@pjmagee pjmagee changed the title Adding winget to goreleaser feat: Adding winget to goreleaser Jun 13, 2024
@pjmagee
pjmagee marked this pull request as ready for review June 13, 2024 22:55
Comment thread .goreleaser.yml Resolved
@pjmagee

pjmagee commented Jun 14, 2024

Copy link
Copy Markdown
Contributor Author

@jedevc It would be awesome if we could update Docs with WinGet and the new Powershell in the same release? But im not sure whom can help validate the goreleaser stuff with me?

@pjmagee
pjmagee force-pushed the goreleaser-winget branch 2 times, most recently from b853fab to 0f95ec5 Compare June 20, 2024 23:03
@github-actions

github-actions Bot commented Jul 5, 2024

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@pjmagee
pjmagee force-pushed the goreleaser-winget branch from 0f95ec5 to d927a16 Compare July 13, 2024 15:31
@pjmagee
pjmagee force-pushed the goreleaser-winget branch from 7688754 to dcce0f9 Compare July 30, 2024 19:06
@pjmagee
pjmagee requested a review from a team as a code owner July 30, 2024 21:53
@jedevc

jedevc commented Jul 31, 2024

Copy link
Copy Markdown
Contributor

Hey @pjmagee sorry for the delay in getting to this! I think we're interested in taking this, it's a much easier way to manage for windows users. cc @jpadams

winget currently seems to be publishing to https://github.com/dagger/winget - that seems similar to how we already have nix, and brew tap, etc. However, I'm assuming we want to PR it to winget-pkgs (there's an example of how that might be done in https://blog.goreleaser.com/announcing-goreleaser-v1-19-the-big-release-b01565c72658 I think)?

If we don't set up to publish to winget-pkgs, what do the installation steps look like, if we have our own manifest repository?

@pjmagee

pjmagee commented Jul 31, 2024 •

Copy link
Copy Markdown
Contributor Author

Hey @pjmagee sorry for the delay in getting to this! I think we're interested in taking this, it's a much easier way to manage for windows users. cc @jpadams

winget currently seems to be publishing to https://github.com/dagger/winget - that seems similar to how we already have nix, and brew tap, etc. However, I'm assuming we want to PR it to winget-pkgs (there's an example of how that might be done in https://blog.goreleaser.com/announcing-goreleaser-v1-19-the-big-release-b01565c72658 I think)?

If we don't set up to publish to winget-pkgs, what do the installation steps look like, if we have our own manifest repository?

Ive been continuing to publish to winget myself, following on from a user who published a version to winget a long time ago, but because it wasnt being maintained, it had a very stale version of dagger.

You can see them all here: https://github.com/microsoft/winget-pkgs/pulls?q=Dagger.Cli

Having your own registry, I suppose an additional step for a user to add the 3rd party 'registry' and then they could likely do a winget search but I think its overkill personally. There is a bit of a delay to getting the packages published as you can see in the history of those PRs when they were raised and merged. However, it's usually done within the day.

@pjmagee
pjmagee force-pushed the goreleaser-winget branch from 7e463ee to d4c16dd Compare August 7, 2024 18:40
@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Signed-off-by: Patrick Magee <[email protected]>
- Add commit_author to winget section

Signed-off-by: Patrick Magee <[email protected]>
- Make sub 'tabs' for powershell and winget alternative install methods

Signed-off-by: Patrick Magee <[email protected]>
@pjmagee

pjmagee commented Sep 1, 2024 •

Copy link
Copy Markdown
Contributor Author

@jedevc I rebased since some changes happened due to goreleraser 2.2, I can only think of 1 benefit of dagger having its own source repository, instant or immediate package updates. But it also means it will not be 'discoverable' by default, users will need to add a custom repository (a bit like helm I suppose)

Then adding the winget packages there, instead of waiting for Microsoft/Community members to approve them. So then in this case, the user would do something like:

winget source add -n dagger -a https://github.com/dagger/winget-releases/ -t winget
winget search dagger.cli

Example output would be like this:

Name       Id         Version Source
-------------------------------------
Dagger CLI Dagger.Cli 0.12.4  winget (old ones ive been publishing)
Dagger CLI Dagger.Cli 0.12.5  dagger (new ones post merge would show up here)

I suppose this can speed up releases being pushed to winget. Requires a bit more effort though.

Would also need to update the docs to include adding the winget source. This PR right now just assumes using the winget-pkg repository maintained by Microsoft at https://github.com/microsoft/winget-pkgs/tree/master/manifests/d/Dagger/Cli

@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions

github-actions Bot commented Oct 3, 2024

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions

Copy link
Copy Markdown
Contributor

This PR was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions Bot closed this Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants