|
| 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.madhead |
| 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: semver-utils |
| 24 | + * |
| 25 | + * One-stop shop for working with semantic versions in your workflows |
| 26 | + * |
| 27 | + * [Action on GitHub](https://github.com/madhead/semver-utils) |
| 28 | + * |
| 29 | + * @param version A version to process |
| 30 | + * @param compareTo A version to compare with, if any |
| 31 | + * @param diffWith A version to diff with. If not specified, the version will be diffed with the |
| 32 | + * `compare-to` input. If `compare-to` is not specified either, nothing happens. |
| 33 | + * @param satisfies A range to check against |
| 34 | + * @param identifier An identifier to pass to the semver's inc function |
| 35 | + * @param lenient Do not fail on incorrect input |
| 36 | + * @param _customInputs Type-unsafe map where you can put any inputs that are not yet supported by |
| 37 | + * the binding |
| 38 | + * @param _customVersion Allows overriding action's version, for example to use a specific minor |
| 39 | + * version, or a newer version that the binding doesn't yet know about |
| 40 | + */ |
| 41 | +public data class SemverUtilsV4 private constructor( |
| 42 | + /** |
| 43 | + * A version to process |
| 44 | + */ |
| 45 | + public val version: String, |
| 46 | + /** |
| 47 | + * A version to compare with, if any |
| 48 | + */ |
| 49 | + public val compareTo: String? = null, |
| 50 | + /** |
| 51 | + * A version to diff with. If not specified, the version will be diffed with the `compare-to` |
| 52 | + * input. If `compare-to` is not specified either, nothing happens. |
| 53 | + */ |
| 54 | + public val diffWith: String? = null, |
| 55 | + /** |
| 56 | + * A range to check against |
| 57 | + */ |
| 58 | + public val satisfies: String? = null, |
| 59 | + /** |
| 60 | + * An identifier to pass to the semver's inc function |
| 61 | + */ |
| 62 | + public val identifier: String? = null, |
| 63 | + /** |
| 64 | + * Do not fail on incorrect input |
| 65 | + */ |
| 66 | + public val lenient: Boolean? = null, |
| 67 | + /** |
| 68 | + * Type-unsafe map where you can put any inputs that are not yet supported by the binding |
| 69 | + */ |
| 70 | + public val _customInputs: Map<String, String> = mapOf(), |
| 71 | + /** |
| 72 | + * Allows overriding action's version, for example to use a specific minor version, or a newer |
| 73 | + * version that the binding doesn't yet know about |
| 74 | + */ |
| 75 | + public val _customVersion: String? = null, |
| 76 | +) : RegularAction<SemverUtilsV4.Outputs>("madhead", "semver-utils", _customVersion ?: "v4") { |
| 77 | + public constructor( |
| 78 | + vararg pleaseUseNamedArguments: Unit, |
| 79 | + version: String, |
| 80 | + compareTo: String? = null, |
| 81 | + diffWith: String? = null, |
| 82 | + satisfies: String? = null, |
| 83 | + identifier: String? = null, |
| 84 | + lenient: Boolean? = null, |
| 85 | + _customInputs: Map<String, String> = mapOf(), |
| 86 | + _customVersion: String? = null, |
| 87 | + ) : this(version=version, compareTo=compareTo, diffWith=diffWith, satisfies=satisfies, |
| 88 | + identifier=identifier, lenient=lenient, _customInputs=_customInputs, |
| 89 | + _customVersion=_customVersion) |
| 90 | + |
| 91 | + @Suppress("SpreadOperator") |
| 92 | + override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf( |
| 93 | + *listOfNotNull( |
| 94 | + "version" to version, |
| 95 | + compareTo?.let { "compare-to" to it }, |
| 96 | + diffWith?.let { "diff-with" to it }, |
| 97 | + satisfies?.let { "satisfies" to it }, |
| 98 | + identifier?.let { "identifier" to it }, |
| 99 | + lenient?.let { "lenient" to it.toString() }, |
| 100 | + *_customInputs.toList().toTypedArray(), |
| 101 | + ).toTypedArray() |
| 102 | + ) |
| 103 | + |
| 104 | + override fun buildOutputObject(stepId: String): Outputs = Outputs(stepId) |
| 105 | + |
| 106 | + public class Outputs( |
| 107 | + stepId: String, |
| 108 | + ) : Action.Outputs(stepId) { |
| 109 | + /** |
| 110 | + * Version's release (major.minor.patch) |
| 111 | + */ |
| 112 | + public val release: String = "steps.$stepId.outputs.release" |
| 113 | + |
| 114 | + /** |
| 115 | + * Version's major number |
| 116 | + */ |
| 117 | + public val major: String = "steps.$stepId.outputs.major" |
| 118 | + |
| 119 | + /** |
| 120 | + * Version's minor number |
| 121 | + */ |
| 122 | + public val minor: String = "steps.$stepId.outputs.minor" |
| 123 | + |
| 124 | + /** |
| 125 | + * Version's patch number |
| 126 | + */ |
| 127 | + public val patch: String = "steps.$stepId.outputs.patch" |
| 128 | + |
| 129 | + /** |
| 130 | + * Version's build |
| 131 | + */ |
| 132 | + public val build: String = "steps.$stepId.outputs.build" |
| 133 | + |
| 134 | + /** |
| 135 | + * Number of components in version's build. Individual сomponents are returned as `build-N` |
| 136 | + * outputs, where an is an index from zero to `build-parts` - 1. |
| 137 | + */ |
| 138 | + public val buildParts: String = "steps.$stepId.outputs.build-parts" |
| 139 | + |
| 140 | + /** |
| 141 | + * Version's pre-release |
| 142 | + */ |
| 143 | + public val prerelease: String = "steps.$stepId.outputs.prerelease" |
| 144 | + |
| 145 | + /** |
| 146 | + * Number of components in version's pre-release. Individual сomponents are returned as |
| 147 | + * `prerelease-N` outputs, where an is an index from zero to `prerelease-parts` - 1. |
| 148 | + */ |
| 149 | + public val prereleaseParts: String = "steps.$stepId.outputs.prerelease-parts" |
| 150 | + |
| 151 | + /** |
| 152 | + * If the compare-to was provided, this output will contain "<" if comes after the version, |
| 153 | + * ">" if it preceeds it, and "=" if they are equal |
| 154 | + */ |
| 155 | + public val comparisonResult: String = "steps.$stepId.outputs.comparison-result" |
| 156 | + |
| 157 | + /** |
| 158 | + * If the diff-to or compare-to were provided, this output will contain the diff result |
| 159 | + */ |
| 160 | + public val diffResult: String = "steps.$stepId.outputs.diff-result" |
| 161 | + |
| 162 | + /** |
| 163 | + * true if the version satisfies the given range |
| 164 | + */ |
| 165 | + public val satisfies: String = "steps.$stepId.outputs.satisfies" |
| 166 | + |
| 167 | + /** |
| 168 | + * A result of the call of the semver's `inc` function with `major` increment |
| 169 | + */ |
| 170 | + public val incMajor: String = "steps.$stepId.outputs.inc-major" |
| 171 | + |
| 172 | + /** |
| 173 | + * A result of the call of the semver's `inc` function with `premajor` increment |
| 174 | + */ |
| 175 | + public val incPremajor: String = "steps.$stepId.outputs.inc-premajor" |
| 176 | + |
| 177 | + /** |
| 178 | + * A result of the call of the semver's `inc` function with `minor` increment |
| 179 | + */ |
| 180 | + public val incMinor: String = "steps.$stepId.outputs.inc-minor" |
| 181 | + |
| 182 | + /** |
| 183 | + * A result of the call of the semver's `inc` function with `preminor` increment |
| 184 | + */ |
| 185 | + public val incPreminor: String = "steps.$stepId.outputs.inc-preminor" |
| 186 | + |
| 187 | + /** |
| 188 | + * A result of the call of the semver's `inc` function with `patch` increment |
| 189 | + */ |
| 190 | + public val incPatch: String = "steps.$stepId.outputs.inc-patch" |
| 191 | + |
| 192 | + /** |
| 193 | + * A result of the call of the semver's `inc` function with `prepatch` increment |
| 194 | + */ |
| 195 | + public val incPrepatch: String = "steps.$stepId.outputs.inc-prepatch" |
| 196 | + |
| 197 | + /** |
| 198 | + * A result of the call of the semver's `inc` function with `prerelease` increment |
| 199 | + */ |
| 200 | + public val incPrerelease: String = "steps.$stepId.outputs.inc-prerelease" |
| 201 | + } |
| 202 | +} |
0 commit comments