You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
982 B
27 lines
982 B
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
|
|
|
|
$InstallerUrl = https://github.com/farag2/Sophia-Script-for-Windows/releases/download/$Latest_Release/Sophia.Script.for.Windows.11.v$($Latest_Release).zip
|
|
|
|
- name: Create winget PR
|
|
run: |
|
|
$Parameters = @{
|
|
Uri = "https://aka.ms/wingetcreate/latest"
|
|
OutFile = "wingetcreate.exe"
|
|
}
|
|
Invoke-WebRequest @Parameters
|
|
|
|
& wingetcreate.exe update TeamSophia.SophiaScript --urls $installerUrl --version $Latest_Release --token "${{ secrets.WINGET_TOKEN }}" --submit
|
|
|