Skip to content

Commit 6b08eda

Browse files
committed
feat(actions): add microsoft/setup-msbuild@v2
1 parent 2340366 commit 6b08eda

File tree

5 files changed

+123
-2
lines changed

5 files changed

+123
-2
lines changed

actions/microsoft/setup-msbuild/v2/action

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce

docs/supported-actions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Click on a version to see the binding's code.
101101
* mi-kas
102102
* [kover-report](https://github.com/mi-kas/kover-report) - v1 ✅: [`KoverReportV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/mikas/KoverReportV1.kt)
103103
* microsoft
104-
* [setup-msbuild](https://github.com/microsoft/setup-msbuild) - v1 ✅: [`SetupMsbuildV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/microsoft/SetupMsbuildV1.kt)
104+
* [setup-msbuild](https://github.com/microsoft/setup-msbuild) - v1 ✅: [`SetupMsbuildV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/microsoft/SetupMsbuildV1.kt), v2 ✅: [`SetupMsbuildV2`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/microsoft/SetupMsbuildV2.kt)
105105
* nexus-actions
106106
* [create-nexus-staging-repo](https://github.com/nexus-actions/create-nexus-staging-repo) - v1 ✅: [`CreateNexusStagingRepoV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/nexusactions/CreateNexusStagingRepoV1.kt)
107107
* [drop-nexus-staging-repo](https://github.com/nexus-actions/drop-nexus-staging-repo) - v1 ✅: [`DropNexusStagingRepoV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/nexusactions/DropNexusStagingRepoV1.kt)
@@ -140,6 +140,6 @@ Click on a version to see the binding's code.
140140
Number of bindings available:
141141

142142
* counting by actions: 84
143-
* counting each version separately: 153
143+
* counting each version separately: 154
144144

145145
Actions [providing typings](https://github.com/typesafegithub/github-actions-typing/) (marked with ✅ on the above list): 18

github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/microsoft/SetupMsbuildV1.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
@file:Suppress(
55
"DataClassPrivateConstructor",
66
"UNUSED_PARAMETER",
7+
"DEPRECATION",
78
)
89

910
package io.github.typesafegithub.workflows.actions.microsoft
@@ -12,6 +13,7 @@ import io.github.typesafegithub.workflows.domain.actions.Action
1213
import io.github.typesafegithub.workflows.domain.actions.RegularAction
1314
import java.util.LinkedHashMap
1415
import kotlin.Boolean
16+
import kotlin.Deprecated
1517
import kotlin.String
1618
import kotlin.Suppress
1719
import kotlin.Unit
@@ -36,6 +38,10 @@ import kotlin.collections.toTypedArray
3638
* @param _customVersion Allows overriding action's version, for example to use a specific minor
3739
* version, or a newer version that the binding doesn't yet know about
3840
*/
41+
@Deprecated(
42+
message = "This action has a newer major version: SetupMsbuildV2",
43+
replaceWith = ReplaceWith("SetupMsbuildV2"),
44+
)
3945
public data class SetupMsbuildV1 private constructor(
4046
/**
4147
* Folder location of where vswhere.exe is located if a self-hosted agent
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
// This file was generated using action-binding-generator. Don't change it by hand, otherwise your
2+
// changes will be overwritten with the next binding code regeneration.
3+
// See https://github.com/typesafegithub/github-workflows-kt for more info.
4+
@file:Suppress(
5+
"DataClassPrivateConstructor",
6+
"UNUSED_PARAMETER",
7+
)
8+
9+
package io.github.typesafegithub.workflows.actions.microsoft
10+
11+
import io.github.typesafegithub.workflows.domain.actions.Action
12+
import io.github.typesafegithub.workflows.domain.actions.RegularAction
13+
import java.util.LinkedHashMap
14+
import kotlin.Boolean
15+
import kotlin.String
16+
import kotlin.Suppress
17+
import kotlin.Unit
18+
import kotlin.collections.Map
19+
import kotlin.collections.toList
20+
import kotlin.collections.toTypedArray
21+
22+
/**
23+
* Action: setup-msbuild
24+
*
25+
* Helps set up MSBuild into PATH for later usage.
26+
*
27+
* [Action on GitHub](https://github.com/microsoft/setup-msbuild)
28+
*
29+
* @param vswherePath Folder location of where vswhere.exe is located if a self-hosted agent
30+
* @param vsVersion Version of Visual Studio to search; defaults to latest if not specified
31+
* @param vsPrerelease Enable searching for pre-release versions of Visual Studio/MSBuild
32+
* @param msbuildArchitecture The preferred processor architecture of MSBuild. Can be either "x86",
33+
* "x64", or "arm64". "x64" is only available from Visual Studio version 17.0 and later.
34+
* @param _customInputs Type-unsafe map where you can put any inputs that are not yet supported by
35+
* the binding
36+
* @param _customVersion Allows overriding action's version, for example to use a specific minor
37+
* version, or a newer version that the binding doesn't yet know about
38+
*/
39+
public data class SetupMsbuildV2 private constructor(
40+
/**
41+
* Folder location of where vswhere.exe is located if a self-hosted agent
42+
*/
43+
public val vswherePath: String? = null,
44+
/**
45+
* Version of Visual Studio to search; defaults to latest if not specified
46+
*/
47+
public val vsVersion: String? = null,
48+
/**
49+
* Enable searching for pre-release versions of Visual Studio/MSBuild
50+
*/
51+
public val vsPrerelease: Boolean? = null,
52+
/**
53+
* The preferred processor architecture of MSBuild. Can be either "x86", "x64", or "arm64".
54+
* "x64" is only available from Visual Studio version 17.0 and later.
55+
*/
56+
public val msbuildArchitecture: SetupMsbuildV2.Architecture? = null,
57+
/**
58+
* Type-unsafe map where you can put any inputs that are not yet supported by the binding
59+
*/
60+
public val _customInputs: Map<String, String> = mapOf(),
61+
/**
62+
* Allows overriding action's version, for example to use a specific minor version, or a newer
63+
* version that the binding doesn't yet know about
64+
*/
65+
public val _customVersion: String? = null,
66+
) : RegularAction<SetupMsbuildV2.Outputs>("microsoft", "setup-msbuild", _customVersion ?: "v2") {
67+
public constructor(
68+
vararg pleaseUseNamedArguments: Unit,
69+
vswherePath: String? = null,
70+
vsVersion: String? = null,
71+
vsPrerelease: Boolean? = null,
72+
msbuildArchitecture: SetupMsbuildV2.Architecture? = null,
73+
_customInputs: Map<String, String> = mapOf(),
74+
_customVersion: String? = null,
75+
) : this(vswherePath=vswherePath, vsVersion=vsVersion, vsPrerelease=vsPrerelease,
76+
msbuildArchitecture=msbuildArchitecture, _customInputs=_customInputs,
77+
_customVersion=_customVersion)
78+
79+
@Suppress("SpreadOperator")
80+
override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf(
81+
*listOfNotNull(
82+
vswherePath?.let { "vswhere-path" to it },
83+
vsVersion?.let { "vs-version" to it },
84+
vsPrerelease?.let { "vs-prerelease" to it.toString() },
85+
msbuildArchitecture?.let { "msbuild-architecture" to it.stringValue },
86+
*_customInputs.toList().toTypedArray(),
87+
).toTypedArray()
88+
)
89+
90+
override fun buildOutputObject(stepId: String): Outputs = Outputs(stepId)
91+
92+
public sealed class Architecture(
93+
public val stringValue: String,
94+
) {
95+
public object X86 : SetupMsbuildV2.Architecture("x86")
96+
97+
public object X64 : SetupMsbuildV2.Architecture("x64")
98+
99+
public object Arm64 : SetupMsbuildV2.Architecture("arm64")
100+
101+
public class Custom(
102+
customStringValue: String,
103+
) : SetupMsbuildV2.Architecture(customStringValue)
104+
}
105+
106+
public class Outputs(
107+
stepId: String,
108+
) : Action.Outputs(stepId) {
109+
/**
110+
* The resulting location of msbuild for your inputs
111+
*/
112+
public val msbuildPath: String = "steps.$stepId.outputs.msbuildPath"
113+
}
114+
}

0 commit comments

Comments
 (0)