Skip to content

Commit 2340366

Browse files
committed
feat(actions): add madhead/semver-utils@v4
1 parent 30f859e commit 2340366

File tree

6 files changed

+213
-4
lines changed

6 files changed

+213
-4
lines changed

actions/madhead/semver-utils/v4/action

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

docs/supported-actions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Click on a version to see the binding's code.
9797
* madhead
9898
* [check-gradle-version](https://github.com/madhead/check-gradle-version) - v1 ✅: [`CheckGradleVersionV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/madhead/CheckGradleVersionV1.kt)
9999
* [intellij-http-client-action](https://github.com/madhead/intellij-http-client-action) - v0 ✅: [`IntellijHttpClientActionV0`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/madhead/IntellijHttpClientActionV0.kt), v231 ✅: [`IntellijHttpClientActionV231`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/madhead/IntellijHttpClientActionV231.kt), v233 ✅: [`IntellijHttpClientActionV233`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/madhead/IntellijHttpClientActionV233.kt)
100-
* [semver-utils](https://github.com/madhead/semver-utils) - v2 ✅: [`SemverUtilsV2`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/madhead/SemverUtilsV2.kt), v3 ✅: [`SemverUtilsV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/madhead/SemverUtilsV3.kt)
100+
* [semver-utils](https://github.com/madhead/semver-utils) - v2 ✅: [`SemverUtilsV2`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/madhead/SemverUtilsV2.kt), v3 ✅: [`SemverUtilsV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/madhead/SemverUtilsV3.kt), v4 ✅: [`SemverUtilsV4`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/madhead/SemverUtilsV4.kt)
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
@@ -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: 152
143+
* counting each version separately: 153
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/madhead/SemverUtilsV2.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ import kotlin.collections.toTypedArray
3939
* version, or a newer version that the binding doesn't yet know about
4040
*/
4141
@Deprecated(
42-
message = "This action has a newer major version: SemverUtilsV3",
43-
replaceWith = ReplaceWith("SemverUtilsV3"),
42+
message = "This action has a newer major version: SemverUtilsV4",
43+
replaceWith = ReplaceWith("SemverUtilsV4"),
4444
)
4545
public data class SemverUtilsV2 private constructor(
4646
/**

github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/madhead/SemverUtilsV3.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.madhead
@@ -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
@@ -38,6 +40,10 @@ import kotlin.collections.toTypedArray
3840
* @param _customVersion Allows overriding action's version, for example to use a specific minor
3941
* version, or a newer version that the binding doesn't yet know about
4042
*/
43+
@Deprecated(
44+
message = "This action has a newer major version: SemverUtilsV4",
45+
replaceWith = ReplaceWith("SemverUtilsV4"),
46+
)
4147
public data class SemverUtilsV3 private constructor(
4248
/**
4349
* A version to process
Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
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

Comments
 (0)