-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(actions): add madhead/semver-utils@v4
- Loading branch information
Showing
6 changed files
with
213 additions
and
4 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
40bbdc6e50b258c09f35f574e83c51f60d2ce3a2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
202 changes: 202 additions & 0 deletions
202
...ows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/madhead/SemverUtilsV4.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
// This file was generated using action-binding-generator. Don't change it by hand, otherwise your | ||
// changes will be overwritten with the next binding code regeneration. | ||
// See https://github.com/typesafegithub/github-workflows-kt for more info. | ||
@file:Suppress( | ||
"DataClassPrivateConstructor", | ||
"UNUSED_PARAMETER", | ||
) | ||
|
||
package io.github.typesafegithub.workflows.actions.madhead | ||
|
||
import io.github.typesafegithub.workflows.domain.actions.Action | ||
import io.github.typesafegithub.workflows.domain.actions.RegularAction | ||
import java.util.LinkedHashMap | ||
import kotlin.Boolean | ||
import kotlin.String | ||
import kotlin.Suppress | ||
import kotlin.Unit | ||
import kotlin.collections.Map | ||
import kotlin.collections.toList | ||
import kotlin.collections.toTypedArray | ||
|
||
/** | ||
* Action: semver-utils | ||
* | ||
* One-stop shop for working with semantic versions in your workflows | ||
* | ||
* [Action on GitHub](https://github.com/madhead/semver-utils) | ||
* | ||
* @param version A version to process | ||
* @param compareTo A version to compare with, if any | ||
* @param diffWith A version to diff with. If not specified, the version will be diffed with the | ||
* `compare-to` input. If `compare-to` is not specified either, nothing happens. | ||
* @param satisfies A range to check against | ||
* @param identifier An identifier to pass to the semver's inc function | ||
* @param lenient Do not fail on incorrect input | ||
* @param _customInputs Type-unsafe map where you can put any inputs that are not yet supported by | ||
* the binding | ||
* @param _customVersion Allows overriding action's version, for example to use a specific minor | ||
* version, or a newer version that the binding doesn't yet know about | ||
*/ | ||
public data class SemverUtilsV4 private constructor( | ||
/** | ||
* A version to process | ||
*/ | ||
public val version: String, | ||
/** | ||
* A version to compare with, if any | ||
*/ | ||
public val compareTo: String? = null, | ||
/** | ||
* A version to diff with. If not specified, the version will be diffed with the `compare-to` | ||
* input. If `compare-to` is not specified either, nothing happens. | ||
*/ | ||
public val diffWith: String? = null, | ||
/** | ||
* A range to check against | ||
*/ | ||
public val satisfies: String? = null, | ||
/** | ||
* An identifier to pass to the semver's inc function | ||
*/ | ||
public val identifier: String? = null, | ||
/** | ||
* Do not fail on incorrect input | ||
*/ | ||
public val lenient: Boolean? = null, | ||
/** | ||
* Type-unsafe map where you can put any inputs that are not yet supported by the binding | ||
*/ | ||
public val _customInputs: Map<String, String> = mapOf(), | ||
/** | ||
* Allows overriding action's version, for example to use a specific minor version, or a newer | ||
* version that the binding doesn't yet know about | ||
*/ | ||
public val _customVersion: String? = null, | ||
) : RegularAction<SemverUtilsV4.Outputs>("madhead", "semver-utils", _customVersion ?: "v4") { | ||
public constructor( | ||
vararg pleaseUseNamedArguments: Unit, | ||
version: String, | ||
compareTo: String? = null, | ||
diffWith: String? = null, | ||
satisfies: String? = null, | ||
identifier: String? = null, | ||
lenient: Boolean? = null, | ||
_customInputs: Map<String, String> = mapOf(), | ||
_customVersion: String? = null, | ||
) : this(version=version, compareTo=compareTo, diffWith=diffWith, satisfies=satisfies, | ||
identifier=identifier, lenient=lenient, _customInputs=_customInputs, | ||
_customVersion=_customVersion) | ||
|
||
@Suppress("SpreadOperator") | ||
override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf( | ||
*listOfNotNull( | ||
"version" to version, | ||
compareTo?.let { "compare-to" to it }, | ||
diffWith?.let { "diff-with" to it }, | ||
satisfies?.let { "satisfies" to it }, | ||
identifier?.let { "identifier" to it }, | ||
lenient?.let { "lenient" to it.toString() }, | ||
*_customInputs.toList().toTypedArray(), | ||
).toTypedArray() | ||
) | ||
|
||
override fun buildOutputObject(stepId: String): Outputs = Outputs(stepId) | ||
|
||
public class Outputs( | ||
stepId: String, | ||
) : Action.Outputs(stepId) { | ||
/** | ||
* Version's release (major.minor.patch) | ||
*/ | ||
public val release: String = "steps.$stepId.outputs.release" | ||
|
||
/** | ||
* Version's major number | ||
*/ | ||
public val major: String = "steps.$stepId.outputs.major" | ||
|
||
/** | ||
* Version's minor number | ||
*/ | ||
public val minor: String = "steps.$stepId.outputs.minor" | ||
|
||
/** | ||
* Version's patch number | ||
*/ | ||
public val patch: String = "steps.$stepId.outputs.patch" | ||
|
||
/** | ||
* Version's build | ||
*/ | ||
public val build: String = "steps.$stepId.outputs.build" | ||
|
||
/** | ||
* Number of components in version's build. Individual сomponents are returned as `build-N` | ||
* outputs, where an is an index from zero to `build-parts` - 1. | ||
*/ | ||
public val buildParts: String = "steps.$stepId.outputs.build-parts" | ||
|
||
/** | ||
* Version's pre-release | ||
*/ | ||
public val prerelease: String = "steps.$stepId.outputs.prerelease" | ||
|
||
/** | ||
* Number of components in version's pre-release. Individual сomponents are returned as | ||
* `prerelease-N` outputs, where an is an index from zero to `prerelease-parts` - 1. | ||
*/ | ||
public val prereleaseParts: String = "steps.$stepId.outputs.prerelease-parts" | ||
|
||
/** | ||
* If the compare-to was provided, this output will contain "<" if comes after the version, | ||
* ">" if it preceeds it, and "=" if they are equal | ||
*/ | ||
public val comparisonResult: String = "steps.$stepId.outputs.comparison-result" | ||
|
||
/** | ||
* If the diff-to or compare-to were provided, this output will contain the diff result | ||
*/ | ||
public val diffResult: String = "steps.$stepId.outputs.diff-result" | ||
|
||
/** | ||
* true if the version satisfies the given range | ||
*/ | ||
public val satisfies: String = "steps.$stepId.outputs.satisfies" | ||
|
||
/** | ||
* A result of the call of the semver's `inc` function with `major` increment | ||
*/ | ||
public val incMajor: String = "steps.$stepId.outputs.inc-major" | ||
|
||
/** | ||
* A result of the call of the semver's `inc` function with `premajor` increment | ||
*/ | ||
public val incPremajor: String = "steps.$stepId.outputs.inc-premajor" | ||
|
||
/** | ||
* A result of the call of the semver's `inc` function with `minor` increment | ||
*/ | ||
public val incMinor: String = "steps.$stepId.outputs.inc-minor" | ||
|
||
/** | ||
* A result of the call of the semver's `inc` function with `preminor` increment | ||
*/ | ||
public val incPreminor: String = "steps.$stepId.outputs.inc-preminor" | ||
|
||
/** | ||
* A result of the call of the semver's `inc` function with `patch` increment | ||
*/ | ||
public val incPatch: String = "steps.$stepId.outputs.inc-patch" | ||
|
||
/** | ||
* A result of the call of the semver's `inc` function with `prepatch` increment | ||
*/ | ||
public val incPrepatch: String = "steps.$stepId.outputs.inc-prepatch" | ||
|
||
/** | ||
* A result of the call of the semver's `inc` function with `prerelease` increment | ||
*/ | ||
public val incPrerelease: String = "steps.$stepId.outputs.inc-prerelease" | ||
} | ||
} |