Repository: sharkdp/bat (language: rust)

Issue:
WinGet-based installation
It would be really great to be able to install `bat` on Windows through the [windows package manager, `winget`](https://docs.microsoft.com/en-us/windows/package-manager/winget/).


Discussion / hints:
Thank you very much for the feedback. Is there anything that we can do here or would it be best to open a ticket on the upstream issue tracker?
I think the main thing to do on your end is to set up a [`wix`-based installer](https://github.com/volks73/cargo-wix) that can _then_ be upstreamed.
We don't have any packaging-related code here in the repo (except for the automatic build of Debian packages). I also don't want to (and don't feel able to) maintain packages for systems that I don't personally use.

Is `cargo-wix` a *requisite* to have `bat` packaged in `winget`? Or just a convenient way to create winget packages?
I'm going to close this, as I don't really see any value in tracking this here. Let me know if someone thinks otherwise.
@sharkdp The latest release of Winget now supports zip installation (https://github.com/microsoft/winget-cli/releases/tag/v1.4.10173). There is an ongoing PR for it:
- https://github.com/microsoft/winget-pkgs/pull/95489

You only need to set up the [Winget Releaser](https://github.com/vedantmgoyal2009/winget-releaser) workflow when it is merged. Are you willing to accept a PR to add Winget Releaser in this repo (and possibly the other ones)?
Thank you. I really don't want to maintain any package management stuff inside this repository (except for what we have already with the Debian packages). Of course it would be great if `bat` could be installed via winget, but is a PUSH based approach really necessary? Can't winget package maintainers PULL the information from the bat repo? (just like everyone else)
If that's really the only way, I'm open to adding this workflow. Worst case, we can just delete it in case it creates problems and no one is here to fix them.
> Can't winget package maintainers PULL the information from the bat repo? (just like everyone else)

The problem is that only one maintainer is doing the pulling for most packages, and it is taking a toll on the CI ([winget-pkgs-automation](https://github.com/vedantmgoyal2009/vedantmgoyal2009/tree/main/winget-pkgs-automation), same author as the Winget Releaser). Winget Releaser was created so that GitHub authors can take the pushing by themselves and help ease the CI for other packages on the automation.

> Worst case, we can just delete it in case it creates problems and no one is here to fix them.

I can help as long as I use this software.
Ok. Let's do it.
On the Winget Releaser side, https://github.com/vedantmgoyal2009/winget-releaser/issues/99 would have to be solved first.
Seems like the issue is resolved! @sitiom are you planning on taking a stab at this ?
As you can see, [bat](https://github.com/microsoft/winget-pkgs/pull/95489) is not yet merged into Winget due to a blocking issue with [dependencies](https://github.com/microsoft/winget-pkgs/pull/95489#issuecomment-1438970934) (`VCRedist`), despite [hyperfine](https://github.com/microsoft/winget-pkgs/pull/94708) and [fd](https://github.com/microsoft/winget-pkgs/pull/94714) being merged, which have the same dependencies.

Fix patch:
diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml
index d1e289c34e..e7cb9cac46 100644
--- a/.github/workflows/CICD.yml
+++ b/.github/workflows/CICD.yml
@@ -431,3 +431,15 @@ jobs:
           ${{ steps.debian-package.outputs.DPKG_PATH }}
       env:
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+  winget:
+    name: Publish to Winget
+    runs-on: ubuntu-latest
+    needs: build
+    if: startsWith(github.ref, 'refs/tags/v')
+    steps:
+      - uses: vedantmgoyal2009/winget-releaser@v2
+        with:
+          identifier: sharkdp.bat
+          installers-regex: '-pc-windows-msvc\.zip$'
+          token: ${{ secrets.WINGET_TOKEN }}
diff --git a/README.md b/README.md
index d94f1eb4d7..1cca9e0d76 100644
--- a/README.md
+++ b/README.md
@@ -404,6 +404,13 @@ You can install `bat` via [scoop](https://scoop.sh/):
 scoop install bat
 ```
 
+#### With Winget
+
+You can install `bat` via [Winget](https://learn.microsoft.com/en-us/windows/package-manager/):
+```bash
+winget install sharkdp.bat
+```
+
 #### From prebuilt binaries:
 
 You can download prebuilt binaries from the [Release page](https://github.com/sharkdp/bat/releases),


Test patch: