ReleaseArgs

data class ReleaseArgs(val body: Output<String>? = null, val discussionCategoryName: Output<String>? = null, val draft: Output<Boolean>? = null, val generateReleaseNotes: Output<Boolean>? = null, val name: Output<String>? = null, val prerelease: Output<Boolean>? = null, val repository: Output<String>? = null, val tagName: Output<String>? = null, val targetCommitish: Output<String>? = null) : ConvertibleToJava<ReleaseArgs>

This resource allows you to create and manage a release in a specific GitHub repository.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.Repository;
import com.pulumi.github.RepositoryArgs;
import com.pulumi.github.Release;
import com.pulumi.github.ReleaseArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var repo = new Repository("repo", RepositoryArgs.builder()
.description("GitHub repo managed by Terraform")
.private_(false)
.build());
var example = new Release("example", ReleaseArgs.builder()
.repository(repo.name())
.tagName("v1.0.0")
.build());
}
}

On Non-Default Branch

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.Repository;
import com.pulumi.github.RepositoryArgs;
import com.pulumi.github.Branch;
import com.pulumi.github.BranchArgs;
import com.pulumi.github.Release;
import com.pulumi.github.ReleaseArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleRepository = new Repository("exampleRepository", RepositoryArgs.builder()
.autoInit(true)
.build());
var exampleBranch = new Branch("exampleBranch", BranchArgs.builder()
.repository(exampleRepository.name())
.branch("branch_name")
.sourceBranch(exampleRepository.defaultBranch())
.build());
var exampleRelease = new Release("exampleRelease", ReleaseArgs.builder()
.repository(exampleRepository.name())
.tagName("v1.0.0")
.targetCommitish(exampleBranch.branch())
.draft(false)
.prerelease(false)
.build());
}
}

Import

This resource can be imported using the name of the repository, combined with the id of the release, and a : character for separating components, e.g.

$ pulumi import github:index/release:Release example repo:12345678

Constructors

Link copied to clipboard
constructor(body: Output<String>? = null, discussionCategoryName: Output<String>? = null, draft: Output<Boolean>? = null, generateReleaseNotes: Output<Boolean>? = null, name: Output<String>? = null, prerelease: Output<Boolean>? = null, repository: Output<String>? = null, tagName: Output<String>? = null, targetCommitish: Output<String>? = null)

Properties

Link copied to clipboard
val body: Output<String>? = null

Text describing the contents of the tag.

Link copied to clipboard
val discussionCategoryName: Output<String>? = null

If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see Managing categories for discussions in your repository.

Link copied to clipboard
val draft: Output<Boolean>? = null

Set to false to create a published release.

Link copied to clipboard
val generateReleaseNotes: Output<Boolean>? = null

Set to true to automatically generate the name and body for this release. If name is specified, the specified name will be used; otherwise, a name will be automatically generated. If body is specified, the body will be pre-pended to the automatically generated notes.

Link copied to clipboard
val name: Output<String>? = null

The name of the release.

Link copied to clipboard
val prerelease: Output<Boolean>? = null

Set to false to identify the release as a full release.

Link copied to clipboard
val repository: Output<String>? = null

The name of the repository.

Link copied to clipboard
val tagName: Output<String>? = null

The name of the tag.

Link copied to clipboard
val targetCommitish: Output<String>? = null

The branch name or commit SHA the tag is created from. Defaults to the default branch of the repository.

Functions

Link copied to clipboard
open override fun toJava(): ReleaseArgs