mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 06:08:07 +00:00
18 lines
763 B
PowerShell
18 lines
763 B
PowerShell
################################################################################
|
|
## File: Install-Kotlin.ps1
|
|
## Desc: Install Kotlin
|
|
################################################################################
|
|
|
|
# Install Kotlin
|
|
$url = "https://api.github.com/repos/JetBrains/kotlin/releases/latest"
|
|
[System.String] $kotlinLatest = (Invoke-RestMethod -Uri $url).assets.browser_download_url -match "kotlin-compiler"
|
|
$kotlinInstallerPath = Start-DownloadWithRetry -Url $kotlinLatest -Name "kotlin-compiler.zip"
|
|
|
|
Write-Host "Expand Kotlin archive"
|
|
$kotlinPath = "C:\tools"
|
|
Extract-7Zip -Path $kotlinInstallerPath -DestinationPath $kotlinPath
|
|
|
|
# Add to PATH
|
|
Add-MachinePathItem "$kotlinPath\kotlinc\bin"
|
|
|
|
Invoke-PesterTests -TestFile "Tools" -TestName "Kotlin" |