TheJoeFin / Text-Grab

Use OCR in Windows quickly and easily with Text Grab. With optional background process and notifications.
https://www.microsoft.com/en-us/p/text-grab/9mznkqj7sl0b?cid=TextGrabGitHub
MIT License
3.19k stars 218 forks source link

Add to WinGet #57

Open TheJoeFin opened 3 years ago

TheJoeFin commented 2 years ago

https://github.com/microsoft/winget-create

TheJoeFin commented 2 years ago

It looks like there needs to be a publicly available source for the signed package. I've not been able to publish the signed package yet. I was hoping I could point to the Microsoft Store as the source, but that is not the case as far as I can tell.

hmnd commented 2 years ago

Perhaps Text-Grab could be added to scoop in the meantime?

hmnd commented 2 years ago

PR for addition opened here https://github.com/lukesampson/scoop-extras/pull/7071 :)

TheJoeFin commented 2 years ago

@hmnd Looks good to me, do I need to do anything or will that PR include Text Grab into scoop?

hmnd commented 2 years ago

@TheJoeFin Awesome! I think the PR is all that's needed :)

hazre commented 2 years ago

If you provide a installer that just saves the exe in a folder and creates a start menu shortcut in the github releases. this can be easily implemented.

then you can just create a GitHub action like this, that automatically creates a update PR when you make a release:

name: Submit TheJoeFin.Text-Grab package to Windows Package Manager Community Repository 
# based off of https://github.com/nushell/nushell/blob/main/.github/workflows/winget-submission.yml

on:
  workflow_dispatch:
  release:
    types: [published]

jobs:

  winget:
    name: Publish winget package
    runs-on: windows-latest
    steps:
      - name: Submit package to Windows Package Manager Community Repository
        run: |

          $wingetPackage = "TheJoeFin.Text-Grab"
          $gitToken = "${{ secrets.PT_WINGET }}"

          $github = Invoke-RestMethod -uri "https://api.github.com/repos/TheJoeFin/Text-Grab/releases" 

          $targetRelease = $github | Where-Object -Property name -match 'Text Grab'| Select -First 1
          $installerUrl = $targetRelease | Select -ExpandProperty assets -First 1 | Where-Object -Property name -match 'Text-Grab.*' | Select -ExpandProperty browser_download_url
          $ver = $targetRelease.tag_name.Trim("v")

          # getting latest wingetcreate file
          iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
          .\wingetcreate.exe update $wingetPackage -s -v $ver -u $installerUrl -t $gitToken