@pulumi/github
Version:
A Pulumi package for creating and managing github cloud resources.
280 lines (279 loc) • 10.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* This resource allows you to create and manage a release in a specific
* GitHub repository.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as github from "@pulumi/github";
*
* const repo = new github.Repository("repo", {
* name: "repo",
* description: "GitHub repo managed by Terraform",
* "private": false,
* });
* const example = new github.Release("example", {
* repository: repo.name,
* tagName: "v1.0.0",
* });
* ```
*
* ### On Non-Default Branch
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as github from "@pulumi/github";
*
* const example = new github.Repository("example", {
* name: "repo",
* autoInit: true,
* });
* const exampleBranch = new github.Branch("example", {
* repository: example.name,
* branch: "branch_name",
* sourceBranch: example.defaultBranch,
* });
* const exampleRelease = new github.Release("example", {
* repository: example.name,
* tagName: "v1.0.0",
* targetCommitish: exampleBranch.branch,
* draft: false,
* prerelease: false,
* });
* ```
*
* ## 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.
*
* ```sh
* $ pulumi import github:index/release:Release example repo:12345678
* ```
*/
export declare class Release extends pulumi.CustomResource {
/**
* Get an existing Release resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ReleaseState, opts?: pulumi.CustomResourceOptions): Release;
/**
* Returns true if the given object is an instance of Release. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Release;
/**
* URL that can be provided to API calls displaying the attached assets to this release.
*/
readonly assetsUrl: pulumi.Output<string>;
/**
* Text describing the contents of the tag.
*/
readonly body: pulumi.Output<string | undefined>;
/**
* This is the date of the commit used for the release, and not the date when the release was drafted or published.
*/
readonly createdAt: pulumi.Output<string>;
/**
* 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](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository).
*/
readonly discussionCategoryName: pulumi.Output<string | undefined>;
/**
* Set to `false` to create a published release.
*/
readonly draft: pulumi.Output<boolean | undefined>;
readonly etag: pulumi.Output<string>;
/**
* 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.
*/
readonly generateReleaseNotes: pulumi.Output<boolean | undefined>;
/**
* URL of the release in GitHub.
*/
readonly htmlUrl: pulumi.Output<string>;
/**
* The name of the release.
*/
readonly name: pulumi.Output<string>;
/**
* GraphQL global node id for use with v4 API
*/
readonly nodeId: pulumi.Output<string>;
/**
* Set to `false` to identify the release as a full release.
*/
readonly prerelease: pulumi.Output<boolean | undefined>;
/**
* This is the date when the release was published. This will be empty if the release is a draft.
*/
readonly publishedAt: pulumi.Output<string>;
/**
* The ID of the release.
*/
readonly releaseId: pulumi.Output<number>;
/**
* The name of the repository.
*/
readonly repository: pulumi.Output<string>;
/**
* The name of the tag.
*/
readonly tagName: pulumi.Output<string>;
/**
* URL that can be provided to API calls to fetch the release TAR archive.
*/
readonly tarballUrl: pulumi.Output<string>;
/**
* The branch name or commit SHA the tag is created from. Defaults to the default branch of the repository.
*/
readonly targetCommitish: pulumi.Output<string | undefined>;
/**
* URL that can be provided to API calls to upload assets.
*/
readonly uploadUrl: pulumi.Output<string>;
/**
* URL that can be provided to API calls that reference this release.
*/
readonly url: pulumi.Output<string>;
/**
* URL that can be provided to API calls to fetch the release ZIP archive.
*/
readonly zipballUrl: pulumi.Output<string>;
/**
* Create a Release resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: ReleaseArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Release resources.
*/
export interface ReleaseState {
/**
* URL that can be provided to API calls displaying the attached assets to this release.
*/
assetsUrl?: pulumi.Input<string>;
/**
* Text describing the contents of the tag.
*/
body?: pulumi.Input<string>;
/**
* This is the date of the commit used for the release, and not the date when the release was drafted or published.
*/
createdAt?: pulumi.Input<string>;
/**
* 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](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository).
*/
discussionCategoryName?: pulumi.Input<string>;
/**
* Set to `false` to create a published release.
*/
draft?: pulumi.Input<boolean>;
etag?: pulumi.Input<string>;
/**
* 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.
*/
generateReleaseNotes?: pulumi.Input<boolean>;
/**
* URL of the release in GitHub.
*/
htmlUrl?: pulumi.Input<string>;
/**
* The name of the release.
*/
name?: pulumi.Input<string>;
/**
* GraphQL global node id for use with v4 API
*/
nodeId?: pulumi.Input<string>;
/**
* Set to `false` to identify the release as a full release.
*/
prerelease?: pulumi.Input<boolean>;
/**
* This is the date when the release was published. This will be empty if the release is a draft.
*/
publishedAt?: pulumi.Input<string>;
/**
* The ID of the release.
*/
releaseId?: pulumi.Input<number>;
/**
* The name of the repository.
*/
repository?: pulumi.Input<string>;
/**
* The name of the tag.
*/
tagName?: pulumi.Input<string>;
/**
* URL that can be provided to API calls to fetch the release TAR archive.
*/
tarballUrl?: pulumi.Input<string>;
/**
* The branch name or commit SHA the tag is created from. Defaults to the default branch of the repository.
*/
targetCommitish?: pulumi.Input<string>;
/**
* URL that can be provided to API calls to upload assets.
*/
uploadUrl?: pulumi.Input<string>;
/**
* URL that can be provided to API calls that reference this release.
*/
url?: pulumi.Input<string>;
/**
* URL that can be provided to API calls to fetch the release ZIP archive.
*/
zipballUrl?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Release resource.
*/
export interface ReleaseArgs {
/**
* Text describing the contents of the tag.
*/
body?: pulumi.Input<string>;
/**
* 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](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository).
*/
discussionCategoryName?: pulumi.Input<string>;
/**
* Set to `false` to create a published release.
*/
draft?: pulumi.Input<boolean>;
/**
* 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.
*/
generateReleaseNotes?: pulumi.Input<boolean>;
/**
* The name of the release.
*/
name?: pulumi.Input<string>;
/**
* Set to `false` to identify the release as a full release.
*/
prerelease?: pulumi.Input<boolean>;
/**
* The name of the repository.
*/
repository: pulumi.Input<string>;
/**
* The name of the tag.
*/
tagName: pulumi.Input<string>;
/**
* The branch name or commit SHA the tag is created from. Defaults to the default branch of the repository.
*/
targetCommitish?: pulumi.Input<string>;
}