Viewing docs for GitHub v4.17.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Viewing docs for GitHub v4.17.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Use this data source to retrieve information about a GitHub release in a specific repository.
Example Usage
To retrieve the latest release that is present in a repository
using System.Collections.Generic;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var example = Github.GetRelease.Invoke(new()
{
Owner = "example-owner",
Repository = "example-repository",
RetrieveBy = "latest",
});
});
package main
import (
"github.com/pulumi/pulumi-github/sdk/v4/go/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := github.GetRelease(ctx, &GetReleaseArgs{
Owner: "example-owner",
Repository: "example-repository",
RetrieveBy: "latest",
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.GithubFunctions;
import com.pulumi.github.inputs.GetReleaseArgs;
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) {
final var example = GithubFunctions.getRelease(GetReleaseArgs.builder()
.owner("example-owner")
.repository("example-repository")
.retrieveBy("latest")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = pulumi.output(github.getRelease({
owner: "example-owner",
repository: "example-repository",
retrieveBy: "latest",
}));
import pulumi
import pulumi_github as github
example = github.get_release(owner="example-owner",
repository="example-repository",
retrieve_by="latest")
variables:
example:
Fn::Invoke:
Function: github:getRelease
Arguments:
owner: example-owner
repository: example-repository
retrieveBy: latest
To retrieve a specific release from a repository based on it's ID
Example coming soon!
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.GithubFunctions;
import com.pulumi.github.inputs.GetReleaseArgs;
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) {
final var example = GithubFunctions.getRelease(GetReleaseArgs.builder()
.id(12345)
.owner("example-owner")
.repository("example-repository")
.retrieveBy("id")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = pulumi.output(github.getRelease({
id: "12345",
owner: "example-owner",
repository: "example-repository",
retrieveBy: "id",
}));
Example coming soon!
variables:
example:
Fn::Invoke:
Function: github:getRelease
Arguments:
id: 12345
owner: example-owner
repository: example-repository
retrieveBy: id
Finally, to retrieve a release based on it's tag
using System.Collections.Generic;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var example = Github.GetRelease.Invoke(new()
{
Owner = "example-owner",
ReleaseTag = "v1.0.0",
Repository = "example-repository",
RetrieveBy = "tag",
});
});
package main
import (
"github.com/pulumi/pulumi-github/sdk/v4/go/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := github.GetRelease(ctx, &GetReleaseArgs{
Owner: "example-owner",
ReleaseTag: pulumi.StringRef("v1.0.0"),
Repository: "example-repository",
RetrieveBy: "tag",
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.GithubFunctions;
import com.pulumi.github.inputs.GetReleaseArgs;
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) {
final var example = GithubFunctions.getRelease(GetReleaseArgs.builder()
.owner("example-owner")
.releaseTag("v1.0.0")
.repository("example-repository")
.retrieveBy("tag")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = pulumi.output(github.getRelease({
owner: "example-owner",
releaseTag: "v1.0.0",
repository: "example-repository",
retrieveBy: "tag",
}));
import pulumi
import pulumi_github as github
example = github.get_release(owner="example-owner",
release_tag="v1.0.0",
repository="example-repository",
retrieve_by="tag")
variables:
example:
Fn::Invoke:
Function: github:getRelease
Arguments:
owner: example-owner
releaseTag: v1.0.0
repository: example-repository
retrieveBy: tag
Using getRelease
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getRelease(args: GetReleaseArgs, opts?: InvokeOptions): Promise<GetReleaseResult>
function getReleaseOutput(args: GetReleaseOutputArgs, opts?: InvokeOptions): Output<GetReleaseResult>def get_release(owner: Optional[str] = None,
release_id: Optional[int] = None,
release_tag: Optional[str] = None,
repository: Optional[str] = None,
retrieve_by: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetReleaseResult
def get_release_output(owner: Optional[pulumi.Input[str]] = None,
release_id: Optional[pulumi.Input[int]] = None,
release_tag: Optional[pulumi.Input[str]] = None,
repository: Optional[pulumi.Input[str]] = None,
retrieve_by: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetReleaseResult]func GetRelease(ctx *Context, args *GetReleaseArgs, opts ...InvokeOption) (*GetReleaseResult, error)
func GetReleaseOutput(ctx *Context, args *GetReleaseOutputArgs, opts ...InvokeOption) GetReleaseResultOutput> Note: This function is named GetRelease in the Go SDK.
public static class GetRelease
{
public static Task<GetReleaseResult> InvokeAsync(GetReleaseArgs args, InvokeOptions? opts = null)
public static Output<GetReleaseResult> Invoke(GetReleaseInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetReleaseResult> getRelease(GetReleaseArgs args, InvokeOptions options)
public static Output<GetReleaseResult> getRelease(GetReleaseArgs args, InvokeOptions options)
fn::invoke:
function: github:index/getRelease:getRelease
arguments:
# arguments dictionaryThe following arguments are supported:
- Owner string
- Owner of the repository.
- Repository string
- Name of the repository to retrieve the release from.
- Retrieve
By string - Describes how to fetch the release. Valid values are
id,tag,latest. - Release
Id int - ID of the release to retrieve. Must be specified when
retrieve_by=id. - Release
Tag string - Tag of the release to retrieve. Must be specified when
retrieve_by=tag.
- Owner string
- Owner of the repository.
- Repository string
- Name of the repository to retrieve the release from.
- Retrieve
By string - Describes how to fetch the release. Valid values are
id,tag,latest. - Release
Id int - ID of the release to retrieve. Must be specified when
retrieve_by=id. - Release
Tag string - Tag of the release to retrieve. Must be specified when
retrieve_by=tag.
- owner String
- Owner of the repository.
- repository String
- Name of the repository to retrieve the release from.
- retrieve
By String - Describes how to fetch the release. Valid values are
id,tag,latest. - release
Id Integer - ID of the release to retrieve. Must be specified when
retrieve_by=id. - release
Tag String - Tag of the release to retrieve. Must be specified when
retrieve_by=tag.
- owner string
- Owner of the repository.
- repository string
- Name of the repository to retrieve the release from.
- retrieve
By string - Describes how to fetch the release. Valid values are
id,tag,latest. - release
Id number - ID of the release to retrieve. Must be specified when
retrieve_by=id. - release
Tag string - Tag of the release to retrieve. Must be specified when
retrieve_by=tag.
- owner str
- Owner of the repository.
- repository str
- Name of the repository to retrieve the release from.
- retrieve_
by str - Describes how to fetch the release. Valid values are
id,tag,latest. - release_
id int - ID of the release to retrieve. Must be specified when
retrieve_by=id. - release_
tag str - Tag of the release to retrieve. Must be specified when
retrieve_by=tag.
- owner String
- Owner of the repository.
- repository String
- Name of the repository to retrieve the release from.
- retrieve
By String - Describes how to fetch the release. Valid values are
id,tag,latest. - release
Id Number - ID of the release to retrieve. Must be specified when
retrieve_by=id. - release
Tag String - Tag of the release to retrieve. Must be specified when
retrieve_by=tag.
getRelease Result
The following output properties are available:
- Asserts
Url string - URL of any associated assets with the release
- Body string
- Contents of the description (body) of a release
- Created
At string - Date of release creation
- Draft bool
- (
Boolean) indicates whether the release is a draft - Html
Url string - URL directing to detailed information on the release
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Name of release
- Owner string
- Prerelease bool
- (
Boolean) indicates whether the release is a prerelease - Published
At string - Date of release publishing
- Repository string
- Retrieve
By string - Tarball
Url string - Download URL of a specific release in
tar.gzformat - Target
Commitish string - Commitish value that determines where the Git release is created from
- Upload
Url string - URL that can be used to upload Assets to the release
- Url string
- Base URL of the release
- Zipball
Url string - Download URL of a specific release in
zipformat - Release
Id int - ID of release
- Release
Tag string - Tag of release
- Asserts
Url string - URL of any associated assets with the release
- Body string
- Contents of the description (body) of a release
- Created
At string - Date of release creation
- Draft bool
- (
Boolean) indicates whether the release is a draft - Html
Url string - URL directing to detailed information on the release
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Name of release
- Owner string
- Prerelease bool
- (
Boolean) indicates whether the release is a prerelease - Published
At string - Date of release publishing
- Repository string
- Retrieve
By string - Tarball
Url string - Download URL of a specific release in
tar.gzformat - Target
Commitish string - Commitish value that determines where the Git release is created from
- Upload
Url string - URL that can be used to upload Assets to the release
- Url string
- Base URL of the release
- Zipball
Url string - Download URL of a specific release in
zipformat - Release
Id int - ID of release
- Release
Tag string - Tag of release
- asserts
Url String - URL of any associated assets with the release
- body String
- Contents of the description (body) of a release
- created
At String - Date of release creation
- draft Boolean
- (
Boolean) indicates whether the release is a draft - html
Url String - URL directing to detailed information on the release
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Name of release
- owner String
- prerelease Boolean
- (
Boolean) indicates whether the release is a prerelease - published
At String - Date of release publishing
- repository String
- retrieve
By String - tarball
Url String - Download URL of a specific release in
tar.gzformat - target
Commitish String - Commitish value that determines where the Git release is created from
- upload
Url String - URL that can be used to upload Assets to the release
- url String
- Base URL of the release
- zipball
Url String - Download URL of a specific release in
zipformat - release
Id Integer - ID of release
- release
Tag String - Tag of release
- asserts
Url string - URL of any associated assets with the release
- body string
- Contents of the description (body) of a release
- created
At string - Date of release creation
- draft boolean
- (
Boolean) indicates whether the release is a draft - html
Url string - URL directing to detailed information on the release
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Name of release
- owner string
- prerelease boolean
- (
Boolean) indicates whether the release is a prerelease - published
At string - Date of release publishing
- repository string
- retrieve
By string - tarball
Url string - Download URL of a specific release in
tar.gzformat - target
Commitish string - Commitish value that determines where the Git release is created from
- upload
Url string - URL that can be used to upload Assets to the release
- url string
- Base URL of the release
- zipball
Url string - Download URL of a specific release in
zipformat - release
Id number - ID of release
- release
Tag string - Tag of release
- asserts_
url str - URL of any associated assets with the release
- body str
- Contents of the description (body) of a release
- created_
at str - Date of release creation
- draft bool
- (
Boolean) indicates whether the release is a draft - html_
url str - URL directing to detailed information on the release
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Name of release
- owner str
- prerelease bool
- (
Boolean) indicates whether the release is a prerelease - published_
at str - Date of release publishing
- repository str
- retrieve_
by str - tarball_
url str - Download URL of a specific release in
tar.gzformat - target_
commitish str - Commitish value that determines where the Git release is created from
- upload_
url str - URL that can be used to upload Assets to the release
- url str
- Base URL of the release
- zipball_
url str - Download URL of a specific release in
zipformat - release_
id int - ID of release
- release_
tag str - Tag of release
- asserts
Url String - URL of any associated assets with the release
- body String
- Contents of the description (body) of a release
- created
At String - Date of release creation
- draft Boolean
- (
Boolean) indicates whether the release is a draft - html
Url String - URL directing to detailed information on the release
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Name of release
- owner String
- prerelease Boolean
- (
Boolean) indicates whether the release is a prerelease - published
At String - Date of release publishing
- repository String
- retrieve
By String - tarball
Url String - Download URL of a specific release in
tar.gzformat - target
Commitish String - Commitish value that determines where the Git release is created from
- upload
Url String - URL that can be used to upload Assets to the release
- url String
- Base URL of the release
- zipball
Url String - Download URL of a specific release in
zipformat - release
Id Number - ID of release
- release
Tag String - Tag of release
Package Details
- Repository
- GitHub pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
githubTerraform Provider.
Viewing docs for GitHub v4.17.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
