Skip to content

Commit

Permalink
feat(actions): add nexus-actions (#1111)
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisCAD committed Nov 17, 2023
1 parent 3ad5e73 commit 59b3726
Show file tree
Hide file tree
Showing 10 changed files with 279 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
990063f02160c633c168037b8b3e8585c76469fe
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c27212525c2a475b7f87728fefd2f899002183fa
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6632a81bfab63557b2717e8423b0a620ae5aa414
Empty file.
10 changes: 7 additions & 3 deletions docs/supported-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ Click on a version to see the binding's code.
* [kover-report](https://github.com/mi-kas/kover-report) - v1 ✅: [`KoverReportV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/library/src/gen/kotlin/io/github/typesafegithub/workflows/actions/mikas/KoverReportV1.kt)
* microsoft
* [setup-msbuild](https://github.com/microsoft/setup-msbuild) - v1 ✅: [`SetupMsbuildV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/library/src/gen/kotlin/io/github/typesafegithub/workflows/actions/microsoft/SetupMsbuildV1.kt)
* nexus-actions
* [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 ]]/library/src/gen/kotlin/io/github/typesafegithub/workflows/actions/nexusactions/CreateNexusStagingRepoV1.kt)
* [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 ]]/library/src/gen/kotlin/io/github/typesafegithub/workflows/actions/nexusactions/DropNexusStagingRepoV1.kt)
* [release-nexus-staging-repo](https://github.com/nexus-actions/release-nexus-staging-repo) - v1 ✅: [`ReleaseNexusStagingRepoV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/library/src/gen/kotlin/io/github/typesafegithub/workflows/actions/nexusactions/ReleaseNexusStagingRepoV1.kt)
* nobrayner
* [discord-webhook](https://github.com/nobrayner/discord-webhook) - v1: [`DiscordWebhookV1`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/library/src/gen/kotlin/io/github/typesafegithub/workflows/actions/nobrayner/DiscordWebhookV1.kt)
* peaceiris
Expand Down Expand Up @@ -137,7 +141,7 @@ Click on a version to see the binding's code.

Number of bindings available:

* counting by actions: 82
* counting each version separately: 131
* counting by actions: 85
* counting each version separately: 134

Actions [providing typings](https://github.com/typesafegithub/github-actions-typing/) (marked with ✅ on the above list): 15
Actions [providing typings](https://github.com/typesafegithub/github-actions-typing/) (marked with ✅ on the above list): 18
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
// 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.nexusactions

import io.github.typesafegithub.workflows.domain.actions.Action
import io.github.typesafegithub.workflows.domain.actions.RegularAction
import java.util.LinkedHashMap
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.collections.toList
import kotlin.collections.toTypedArray

/**
* Action: Create Nexus Staging Repo
*
* Creates a new staging repo on https://oss.sonatype.org/
*
* [Action on GitHub](https://github.com/nexus-actions/create-nexus-staging-repo)
*/
public data class CreateNexusStagingRepoV1 private constructor(
/**
* Your Sonatype username, same the Sonatype Jira one
*/
public val username: String,
/**
* Your Sonatype password, same the Sonatype Jira one
*/
public val password: String,
/**
* Your staging profile ID. You can get it at
* https://oss.sonatype.org/#stagingProfiles;$staginProfileId
*/
public val stagingProfileId: String,
/**
* A description to identify the newly created repository
*/
public val description: String? = null,
/**
* The url of your nexus repository, defaults to OSSRH (https://oss.sonatype.org/service/local/)
*/
public val baseUrl: String? = 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<CreateNexusStagingRepoV1.Outputs>("nexus-actions", "create-nexus-staging-repo",
_customVersion ?: "v1") {
public constructor(
vararg pleaseUseNamedArguments: Unit,
username: String,
password: String,
stagingProfileId: String,
description: String? = null,
baseUrl: String? = null,
_customInputs: Map<String, String> = mapOf(),
_customVersion: String? = null,
) : this(username=username, password=password, stagingProfileId=stagingProfileId,
description=description, baseUrl=baseUrl, _customInputs=_customInputs,
_customVersion=_customVersion)

@Suppress("SpreadOperator")
override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf(
*listOfNotNull(
"username" to username,
"password" to password,
"staging_profile_id" to stagingProfileId,
description?.let { "description" to it },
baseUrl?.let { "base_url" to it },
*_customInputs.toList().toTypedArray(),
).toTypedArray()
)

override fun buildOutputObject(stepId: String): Outputs = Outputs(stepId)

public class Outputs(
stepId: String,
) : Action.Outputs(stepId) {
/**
* The ID of the newly created staging repository
*/
public val repositoryId: String = "steps.$stepId.outputs.repository_id"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// 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.nexusactions

import io.github.typesafegithub.workflows.domain.actions.Action
import io.github.typesafegithub.workflows.domain.actions.RegularAction
import java.util.LinkedHashMap
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.collections.toList
import kotlin.collections.toTypedArray

/**
* Action: Drop Nexus Staging Repo
*
* Drops a staged repo, with a given ID, on https://oss.sonatype.org/.
*
* [Action on GitHub](https://github.com/nexus-actions/drop-nexus-staging-repo)
*/
public data class DropNexusStagingRepoV1 private constructor(
/**
* Your Sonatype username, same the Sonatype Jira one.
*/
public val username: String,
/**
* Your Sonatype password, same the Sonatype Jira one.
*/
public val password: String,
/**
* The ID of the staged repository to drop.
*/
public val stagingRepositoryId: String,
/**
* The url of your nexus repository, defaults to OSSRH (https://oss.sonatype.org/service/local/)
*/
public val baseUrl: String? = 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<Action.Outputs>("nexus-actions", "drop-nexus-staging-repo", _customVersion ?:
"v1") {
public constructor(
vararg pleaseUseNamedArguments: Unit,
username: String,
password: String,
stagingRepositoryId: String,
baseUrl: String? = null,
_customInputs: Map<String, String> = mapOf(),
_customVersion: String? = null,
) : this(username=username, password=password, stagingRepositoryId=stagingRepositoryId,
baseUrl=baseUrl, _customInputs=_customInputs, _customVersion=_customVersion)

@Suppress("SpreadOperator")
override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf(
*listOfNotNull(
"username" to username,
"password" to password,
"staging_repository_id" to stagingRepositoryId,
baseUrl?.let { "base_url" to it },
*_customInputs.toList().toTypedArray(),
).toTypedArray()
)

override fun buildOutputObject(stepId: String): Action.Outputs = Outputs(stepId)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
// 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.nexusactions

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: Close and Release Nexus Staged Repo
*
* Closes and releases a staged repo, with a given ID, on https://oss.sonatype.org/.
*
* [Action on GitHub](https://github.com/nexus-actions/release-nexus-staging-repo)
*/
public data class ReleaseNexusStagingRepoV1 private constructor(
/**
* Your Sonatype username, same the Sonatype Jira one.
*/
public val username: String,
/**
* Your Sonatype password, same the Sonatype Jira one.
*/
public val password: String,
/**
* The ID of the staged repository to close and release.
*/
public val stagingRepositoryId: String,
/**
* The description to use for the closed repository
*/
public val description: String? = null,
/**
* The url of your nexus repository, defaults to OSSRH (https://oss.sonatype.org/service/local/)
*/
public val baseUrl: String? = null,
/**
* This option disable the auto-release process, you will have to do it manually on
* https://oss.sonatype.org/.
*/
public val closeOnly: 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<Action.Outputs>("nexus-actions", "release-nexus-staging-repo", _customVersion ?:
"v1") {
public constructor(
vararg pleaseUseNamedArguments: Unit,
username: String,
password: String,
stagingRepositoryId: String,
description: String? = null,
baseUrl: String? = null,
closeOnly: Boolean? = null,
_customInputs: Map<String, String> = mapOf(),
_customVersion: String? = null,
) : this(username=username, password=password, stagingRepositoryId=stagingRepositoryId,
description=description, baseUrl=baseUrl, closeOnly=closeOnly,
_customInputs=_customInputs, _customVersion=_customVersion)

@Suppress("SpreadOperator")
override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf(
*listOfNotNull(
"username" to username,
"password" to password,
"staging_repository_id" to stagingRepositoryId,
description?.let { "description" to it },
baseUrl?.let { "base_url" to it },
closeOnly?.let { "close_only" to it.toString() },
*_customInputs.toList().toTypedArray(),
).toTypedArray()
)

override fun buildOutputObject(stepId: String): Action.Outputs = Outputs(stepId)
}

0 comments on commit 59b3726

Please sign in to comment.