mirror of
https://github.com/actions/runner-images.git
synced 2025-12-17 23:28:57 +00:00
[Windows] Rework Kotlin installation (#4083)
This commit is contained in:
committed by
GitHub
parent
db5e4084fe
commit
ecfc9c43da
18
images/win/scripts/Installers/Install-Kotlin.ps1
Normal file
18
images/win/scripts/Installers/Install-Kotlin.ps1
Normal file
@@ -0,0 +1,18 @@
|
||||
################################################################################
|
||||
## 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"
|
||||
Reference in New Issue
Block a user