Skip to content

Commit ba1f620

Browse files
authored
feat(library): add support for windows-2025 runner (#1901)
Noticed thanks to #1896.
1 parent 8760889 commit ba1f620

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

github-workflows-kt/api/github-workflows-kt.api

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,10 @@ public final class io/github/typesafegithub/workflows/domain/RunnerType$Windows2
399399
public static final field INSTANCE Lio/github/typesafegithub/workflows/domain/RunnerType$Windows2022;
400400
}
401401

402+
public final class io/github/typesafegithub/workflows/domain/RunnerType$Windows2025 : io/github/typesafegithub/workflows/domain/RunnerType {
403+
public static final field INSTANCE Lio/github/typesafegithub/workflows/domain/RunnerType$Windows2025;
404+
}
405+
402406
public final class io/github/typesafegithub/workflows/domain/RunnerType$WindowsLatest : io/github/typesafegithub/workflows/domain/RunnerType {
403407
public static final field INSTANCE Lio/github/typesafegithub/workflows/domain/RunnerType$WindowsLatest;
404408
}

github-workflows-kt/src/main/kotlin/io/github/typesafegithub/workflows/domain/RunnerType.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ public sealed interface RunnerType {
3939
public object MacOSLatest : RunnerType
4040

4141
// Windows runners
42+
public object Windows2025 : RunnerType
43+
4244
public object Windows2022 : RunnerType
4345

4446
public object Windows2019 : RunnerType

github-workflows-kt/src/main/kotlin/io/github/typesafegithub/workflows/yaml/JobsToYaml.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import io.github.typesafegithub.workflows.domain.RunnerType.UbuntuLatest
1313
import io.github.typesafegithub.workflows.domain.RunnerType.Windows2016
1414
import io.github.typesafegithub.workflows.domain.RunnerType.Windows2019
1515
import io.github.typesafegithub.workflows.domain.RunnerType.Windows2022
16+
import io.github.typesafegithub.workflows.domain.RunnerType.Windows2025
1617
import io.github.typesafegithub.workflows.domain.RunnerType.WindowsLatest
1718
import io.github.typesafegithub.workflows.internal.InternalGithubActionsApi
1819

@@ -59,6 +60,7 @@ private fun Job<*>.toYaml(): Map<String, Any?> =
5960
mapOf("steps" to steps.stepsToYaml())
6061

6162
@InternalGithubActionsApi
63+
@Suppress("CyclomaticComplexMethod")
6264
public fun RunnerType.toYaml(): Any =
6365
when (this) {
6466
is Custom -> runsOn
@@ -71,6 +73,7 @@ public fun RunnerType.toYaml(): Any =
7173
UbuntuLatest -> "ubuntu-latest"
7274
WindowsLatest -> "windows-latest"
7375
MacOSLatest -> "macos-latest"
76+
Windows2025 -> "windows-2025"
7477
Windows2022 -> "windows-2022"
7578
Windows2019 -> "windows-2019"
7679
Windows2016 -> "windows-2016"

0 commit comments

Comments
 (0)