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

Windows install through winget #441

Open
bluearcher-bc opened this issue Mar 28, 2024 · 9 comments
Open

Windows install through winget #441

bluearcher-bc opened this issue Mar 28, 2024 · 9 comments

Comments

@bluearcher-bc
Copy link

It would be very useful to the community if we could install gping using Microsoft's winget package manager.

A manifest would need to be created and submitted to the winget repository for each release.

https://learn.microsoft.com/en-us/windows/package-manager/package/

@orf
Copy link
Owner

orf commented Sep 13, 2024

While this is a good idea, the authoring and updating process seems arduous. With Homebrew it’s a simple, single Github action that runs after every release.

it’s not clear from the documentation if I need to create an installer for this, or if I can just use the existing binary.

I’ll leave this open and have a look when/if I have time, and if anyone wants to give some more information here that might make it clearer (or any pointers to how I can automate this) then that would be helpful.

@orf
Copy link
Owner

orf commented Dec 16, 2024

I'm going to close this - if anyone wants to help then I'm happy to take on maintenance, but I don't have the bandwidth to do this right now.

@orf orf closed this as completed Dec 16, 2024
@bluearcher-bc
Copy link
Author

This seems like it will be helpful. I don't think you need to create an installer if you don't want to.

https://github.com/microsoft/winget-cli/blob/master/doc/specs/%23182%20-%20Support%20for%20installation%20of%20portable%20standalone%20apps.md

@ChristopherHaklar
Copy link

Hey 👋 I figured I'd use this thread instead of submitting a new issue.

Winget is able to use your portable .exe release to install gping. (https://github.com/microsoft/winget-pkgs/blob/dcdd31bb5f794178c8370f9be879e3071ad3ea4d/doc/FAQ.md#how-do-portable-applications-get-installed)

I've created the manifest and submitted it to be published here:

As for updating the manifest that can be done using a GitHub Action. Microsoft updates their Terminal app using this action: https://github.com/microsoft/terminal/blob/main/.github/workflows/winget.yml. I can submit the PR to add it here, but the GitHub token would need to be handled by you @orf.

If you don't want gping on winget just let me know and I'll close the PR & Issue 👍

@kris6673
Copy link

kris6673 commented Jan 15, 2025

If you want to automate publishing to winget, winget releaser is a GH action that can do it for you too :)
https://github.com/russellbanks/Komac?tab=readme-ov-file#usage-with-github-actions-winget-releaser-

@ChristopherHaklar
Copy link

The package PR got merged, so let me know if you need help setting up that GHA pipeline. 👍

@orf orf reopened this Jan 31, 2025
@orf
Copy link
Owner

orf commented Jan 31, 2025

Thanks @ChristopherHaklar and @kris6673! I'll take a look at this now :)

@orf
Copy link
Owner

orf commented Jan 31, 2025

I might need a hand with this. I added a new workflow using the action linked above, and attempted to release: https://github.com/orf/gping/actions/runs/13073605695

I triggered it with this tag, but it is seeming to fail with missing URLs.

I don't have the time in the next week to work on this any further, but I'd be happy to approve any change that adds a working pipeline using the action or using the same method as the Terminal app

@kris6673
Copy link

I'll try, but I'm not great at GH actions.
From what I can see there's 3 issues.

  1. It cant get the URL
  2. It cant find the ZIP file
  3. The package version is wrong

I think this might work @orf

name: Publish to WinGet
on:
  workflow_dispatch:
    inputs:
      tag:
        description: Tag to release
        required: true
  release:
    types: [released]

jobs:
  publish:
    runs-on: windows-latest
    steps:
      - name: Get version
        id: get-version
        run: |
          # Finding the version from release name
          $VERSION="${{ github.event.release.name }}" -replace '[^0-9.]',''
          "version=$VERSION" >> $env:GITHUB_OUTPUT
        shell: pwsh
      - uses: vedantmgoyal9/winget-releaser@main
        with:
          identifier: orf.gping
          installers-regex: '(?i)windows.*\.zip$' # Only .zip files with Windows in the name
          release-tag: ${{ steps.get-version.outputs.version }}
          token: ${{ secrets.COMMITTER_TOKEN }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants