From 4a2ba420c726de4c71be0cb839e2f9cd10dde948 Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Sat, 19 Apr 2025 15:29:16 +0300 Subject: [PATCH] Create winget.yml --- .github/workflows/winget.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 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 00000000..2cd399df --- /dev/null +++ b/.github/workflows/winget.yml @@ -0,0 +1,27 @@ +name: Publish to WinGet + +on: + workflow_dispatch: + +jobs: + publish: + runs-on: windows-latest + steps: + - name: Getting latest release for Windows 11 + run: | + $Parameters = @{ + Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json" + } + $Latest_Release = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_11_PowerShell_5_1 + + - name: Publish Sophia Script for Windows (Windows 11) + # https://github.com/vedantmgoyal9/winget-releaser + uses: vedantmgoyal9/winget-releaser@main + with: + identifier: TeamSophia.SophiaScript + version: $Latest_Release + release-tag: $Latest_Release + installers-regex: "Sophia.Script.for.Windows.11.v$($Latest_Release).zip" + release-notes-url: https://github.com/farag2/Sophia-Script-for-Windows/blob/master/CHANGELOG.md + # https://github.com/settings/tokens + token: ${{ secrets.WINGET_TOKEN }}