Update releaseToWinGet.yml
This commit is contained in:
parent
249da08234
commit
2c026e170b
|
@ -24,19 +24,19 @@ jobs:
|
||||||
$repo = "powershell/win32-openssh"
|
$repo = "powershell/win32-openssh"
|
||||||
$releases = "https://api.github.com/repos/$repo/releases"
|
$releases = "https://api.github.com/repos/$repo/releases"
|
||||||
$releaseInfo = (Invoke-WebRequest $releases | ConvertFrom-Json)[0]
|
$releaseInfo = (Invoke-WebRequest $releases | ConvertFrom-Json)[0]
|
||||||
$tag = $releaseInfo.tagname
|
$tag = $releaseInfo.tag_name
|
||||||
forEach ($filename in $releaseInfo.assets.name) {
|
forEach ($filename in $releaseInfo.assets.name) {
|
||||||
if ($filename.split(".")[-1] -contains "msi") {
|
if ($filename.split(".")[-1] -contains "msi") {
|
||||||
if ($filename.split("-")[1] -contains "Win32") {
|
if ($filename.split("-")[1] -contains "Win32") {
|
||||||
$msi_x86 = $filename
|
$msi_x86 = "https://github.com/$repo/releases/download/$tag/$filename"
|
||||||
}
|
}
|
||||||
if ($filename.split("-")[1] -contains "Win64") {
|
if ($filename.split("-")[1] -contains "Win64") {
|
||||||
$msi_x64 = $filename
|
$msi_x64 = "https://github.com/$repo/releases/download/$tag/$filename"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$urls = "https://github.com/$repo/releases/download/$tag/$msi_x64, https://github.com/$repo/releases/download/$tag/$msi_x86"
|
echo "URL_X86=$msi_x86" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
|
||||||
echo "PACKAGE_URLS=$urls" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
|
echo "URL_X64=$msi_x64" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
|
||||||
name: Get Release URLs
|
name: Get Release URLs
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
|
@ -51,6 +51,6 @@ jobs:
|
||||||
name: Download WinGet Requirements
|
name: Download WinGet Requirements
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
wingetcreate update Microsoft.OpenSSH --urls $env:PACKAGE_URLS -o $env:GITHUB_WORKSPACE
|
wingetcreate update Microsoft.OpenSSH -u $env:URL_X86, $env:URL_X64 -o $env:GITHUB_WORKSPACE
|
||||||
# wingetcreate update Microsoft.OpenSSH -u $env:PACKAGE_URLS -t ${{ secrets.GITHUB_TOKEN }} --submit
|
# wingetcreate update Microsoft.OpenSSH -u $env:URL_X86, $env:URL_X64 -t ${{ secrets.GITHUB_TOKEN }} --submit
|
||||||
name: WinGet Update
|
name: WinGet Update
|
||||||
|
|
Loading…
Reference in New Issue