Browse Source

Update Sophia.yml

pull/149/head
Dmitry Nefedov 4 years ago
committed by GitHub
parent
commit
7dd4135f68
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      .github/workflows/Sophia.yml

23
.github/workflows/Sophia.yml

@ -58,26 +58,31 @@ jobs:
Copy-Item -Path "Sophia\PowerShell 5.1\*" -Destination $BUILD_DIR -Recurse -Force Copy-Item -Path "Sophia\PowerShell 5.1\*" -Destination $BUILD_DIR -Recurse -Force
Copy-Item -Path "Sophia\PowerShell 7.x\*" -Destination $BUILD_DIR -Recurse -Force Copy-Item -Path "Sophia\PowerShell 7.x\*" -Destination $BUILD_DIR -Recurse -Force
# Download Microsoft.Windows.SDK.NET.Ref
$Parameters = @{ $Parameters = @{
Uri = "https://www.nuget.org/api/v2/package/Microsoft.Windows.SDK.NET.Ref/10.0.19041.14" Uri = "https://www.nuget.org/api/v2/package/Microsoft.Windows.SDK.NET.Ref"
OutFile = "$PSScriptRoot\microsoft.windows.sdk.net.ref.nupkg" OutFile = "$PSScriptRoot\microsoft.windows.sdk.net.ref.nupkg"
Verbose = [switch]::Present Verbose = [switch]::Present
} }
Invoke-WebRequest @Parameters Invoke-WebRequest @Parameters
Rename-Item -Path "$PSScriptRoot\microsoft.windows.sdk.net.ref.nupkg" -NewName "microsoft.windows.sdk.net.ref.zip" Rename-Item -Path "$PSScriptRoot\Microsoft.Windows.SDK.NET.Ref.nupkg" -NewName "Microsoft.Windows.SDK.NET.Ref.zip"
$Parameters = @{ $Parameters = @{
Path = "$PSScriptRoot\microsoft.windows.sdk.net.ref.zip" Path = "$PSScriptRoot\Microsoft.Windows.SDK.NET.Ref.zip"
DestinationPath = "$PSScriptRoot\sdk" DestinationPath = "$PSScriptRoot\SDK"
Force = [switch]::Present Force = [switch]::Present
Verbose = [switch]::Present Verbose = [switch]::Present
} }
Expand-Archive @Parameters Expand-Archive @Parameters
# Download CsWinRT
$LatestRelease = (Invoke-RestMethod -Uri "https://api.github.com/repos/microsoft/CsWinRT/releases").tag_name | Select-Object -First 1 $LatestRelease = (Invoke-RestMethod -Uri "https://api.github.com/repos/microsoft/CsWinRT/releases").tag_name | Select-Object -First 1
$Download = ((Invoke-RestMethod -Uri "https://api.github.com/repos/microsoft/CsWinRT/releases") | Where-Object -FilterScript {$_.tag_name -eq $LatestRelease}).assets | Where-Object -FilterScript {$_.browser_download_url -match "nupkg"}
$URL = $Download.browser_download_url
$Parameters = @{ $Parameters = @{
Uri = "https://github.com/microsoft/CsWinRT/releases/download/$LatestRelease/Microsoft.Windows.CsWinRT.1.1.3.nupkg" Uri = $URL
OutFile = "$PSScriptRoot\Microsoft.Windows.CsWinRT.nupkg" OutFile = "$PSScriptRoot\Microsoft.Windows.CsWinRT.nupkg"
Verbose = [switch]::Present Verbose = [switch]::Present
} }
@ -93,15 +98,15 @@ jobs:
} }
Expand-Archive @Parameters Expand-Archive @Parameters
New-Item -Path $BUILD_DIR\Library -ItemType Directory -Force New-Item -Path $BUILD_DIR\Libraries -ItemType Directory -Force
Copy-Item -Path "$PSScriptRoot\sdk\lib\Microsoft.Windows.SDK.NET.dll" -Destination $BUILD_DIR\Library -Recurse -Force Copy-Item -Path "$PSScriptRoot\sdk\lib\Microsoft.Windows.SDK.NET.dll" -Destination $BUILD_DIR\Libraries -Recurse -Force
Copy-Item -Path "$PSScriptRoot\CsWinRT\lib\net5.0\WinRT.Runtime.dll" -Destination $BUILD_DIR\Library -Recurse -Force Copy-Item -Path "$PSScriptRoot\CsWinRT\lib\net5.0\WinRT.Runtime.dll" -Destination $BUILD_DIR\Libraries -Recurse -Force
Compress-Archive -Path $BUILD_DIR -DestinationPath $ZIP -Force Compress-Archive -Path $BUILD_DIR -DestinationPath $ZIP -Force
Remove-Item -Path "$PSScriptRoot\CsWinRT", "$PSScriptRoot\sdk" -Recurse -Force Remove-Item -Path "$PSScriptRoot\CsWinRT", "$PSScriptRoot\sdk" -Recurse -Force
Remove-Item -Path "$PSScriptRoot\Microsoft.Windows.CsWinRT.zip", "$PSScriptRoot\microsoft.windows.sdk.net.ref.zip" -Force Remove-Item -Path "$PSScriptRoot\Microsoft.Windows.CsWinRT.zip", "$PSScriptRoot\Microsoft.Windows.SDK.NET.Ref.zip" -Force
- name: Build LTSC - name: Build LTSC
run: | run: |

Loading…
Cancel
Save