@@ -57,6 +57,13 @@ import kotlin.collections.toTypedArray
5757 * on GitHub-hosted runners or self-hosted runners with a very similar image to the ones used by
5858 * GitHub runners.
5959 * The default is to detect this automatically based on the OS, OS version and architecture.
60+ * @param windowsToolchain This input allows to override the default toolchain setup on Windows.
61+ * The default setting ('default') installs a toolchain based on the selected Ruby.
62+ * Specifically, it installs MSYS2 if not already there and installs mingw/ucrt/mswin build tools
63+ * and packages.
64+ * It also sets environment variables using 'ridk' or 'vcvars64.bat' based on the selected Ruby.
65+ * At present, the only other setting than 'default' is 'none', which only adds Ruby to PATH.
66+ * No build tools or packages are installed, nor are any ENV setting changed to activate them.
6067 * @param _customInputs Type-unsafe map where you can put any inputs that are not yet supported by
6168 * the binding
6269 * @param _customVersion Allows overriding action's version, for example to use a specific minor
@@ -115,6 +122,16 @@ public data class SetupRubyV1 private constructor(
115122 * The default is to detect this automatically based on the OS, OS version and architecture.
116123 */
117124 public val selfHosted : Boolean? = null ,
125+ /* *
126+ * This input allows to override the default toolchain setup on Windows.
127+ * The default setting ('default') installs a toolchain based on the selected Ruby.
128+ * Specifically, it installs MSYS2 if not already there and installs mingw/ucrt/mswin build
129+ * tools and packages.
130+ * It also sets environment variables using 'ridk' or 'vcvars64.bat' based on the selected Ruby.
131+ * At present, the only other setting than 'default' is 'none', which only adds Ruby to PATH.
132+ * No build tools or packages are installed, nor are any ENV setting changed to activate them.
133+ */
134+ public val windowsToolchain : SetupRubyV1 .WindowsToolchain ? = null ,
118135 /* *
119136 * Type-unsafe map where you can put any inputs that are not yet supported by the binding
120137 */
@@ -134,11 +151,13 @@ public data class SetupRubyV1 private constructor(
134151 workingDirectory: String? = null ,
135152 cacheVersion: String? = null ,
136153 selfHosted: Boolean? = null ,
154+ windowsToolchain: SetupRubyV1 .WindowsToolchain ? = null ,
137155 _customInputs : Map <String , String > = mapOf (),
138156 _customVersion : String? = null ,
139157 ) : this (rubyVersion= rubyVersion, rubygems= rubygems, bundler= bundler, bundlerCache= bundlerCache,
140158 workingDirectory= workingDirectory, cacheVersion= cacheVersion, selfHosted= selfHosted,
141- _customInputs = _customInputs , _customVersion = _customVersion )
159+ windowsToolchain= windowsToolchain, _customInputs = _customInputs ,
160+ _customVersion = _customVersion )
142161
143162 @Suppress(" SpreadOperator" )
144163 override fun toYamlArguments (): LinkedHashMap <String , String > = linkedMapOf(
@@ -150,12 +169,25 @@ public data class SetupRubyV1 private constructor(
150169 workingDirectory?.let { " working-directory" to it },
151170 cacheVersion?.let { " cache-version" to it },
152171 selfHosted?.let { " self-hosted" to it.toString() },
172+ windowsToolchain?.let { " windows-toolchain" to it.stringValue },
153173 * _customInputs .toList().toTypedArray(),
154174 ).toTypedArray()
155175 )
156176
157177 override fun buildOutputObject (stepId : String ): Outputs = Outputs (stepId)
158178
179+ public sealed class WindowsToolchain (
180+ public val stringValue : String ,
181+ ) {
182+ public object Default : SetupRubyV1.WindowsToolchain(" default" )
183+
184+ public object None : SetupRubyV1.WindowsToolchain(" none" )
185+
186+ public class Custom (
187+ customStringValue : String ,
188+ ) : SetupRubyV1.WindowsToolchain(customStringValue)
189+ }
190+
159191 public class Outputs (
160192 stepId : String ,
161193 ) : Action.Outputs(stepId) {
0 commit comments