From 0f25dc36beb0a24b6746b396aa56c41b6da87179 Mon Sep 17 00:00:00 2001 From: Hayden Barnes Date: Thu, 18 Jan 2024 22:14:36 -0500 Subject: [PATCH] Create winget.yml --- .github/workflows/winget.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/winget.yml diff --git a/.github/workflows/winget.yml b/.github/workflows/winget.yml new file mode 100644 index 0000000..0c12290 --- /dev/null +++ b/.github/workflows/winget.yml @@ -0,0 +1,20 @@ +name: Update Winget Manifest + +on: + release: + types: [published] + +jobs: + update: + runs-on: windows-latest + + steps: + - name: Install winget-create + run: | + Invoke-WebRequest -Uri 'https://aka.ms/wingetcreate/latest' -OutFile 'wingetcreate.exe' + + - name: Update Winget Manifest + run: | + $assets = '${{ toJson(github.event.release.assets) }}' | ConvertFrom-Json + $url = ($assets | Where-Object { $_.name -eq "${{ github.event.release.tag_name }}.zip" }).browser_download_url + .\wingetcreate.exe update --submit "wslinternals" --token "${{ secrets.WINGET_TOKEN }}" -urls $url --version ${{ github.event.release.tag_name }} sirredbeard.wslinternals \ No newline at end of file