Viewing docs for GitHub v6.12.1
published on Thursday, Feb 12, 2026 by Pulumi
published on Thursday, Feb 12, 2026 by Pulumi
Viewing docs for GitHub v6.12.1
published on Thursday, Feb 12, 2026 by Pulumi
published on Thursday, Feb 12, 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:
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = github.getRelease({
repository: "example-repository",
owner: "example-owner",
retrieveBy: "latest",
});
import pulumi
import pulumi_github as github
example = github.get_release(repository="example-repository",
owner="example-owner",
retrieve_by="latest")
package main
import (
"github.com/pulumi/pulumi-github/sdk/v6/go/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := github.LookupRelease(ctx, &github.LookupReleaseArgs{
Repository: "example-repository",
Owner: "example-owner",
RetrieveBy: "latest",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var example = Github.GetRelease.Invoke(new()
{
Repository = "example-repository",
Owner = "example-owner",
RetrieveBy = "latest",
});
});
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()
.repository("example-repository")
.owner("example-owner")
.retrieveBy("latest")
.build());
}
}
variables:
example:
fn::invoke:
function: github:getRelease
arguments:
repository: example-repository
owner: example-owner
retrieveBy: latest
To retrieve a specific release from a repository based on its ID:
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
variables:
example:
fn::invoke:
function: github:getRelease
arguments:
repository: example-repository
owner: example-owner
retrieveBy: id
id: 12345
Finally, to retrieve a release based on its tag:
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = github.getRelease({
repository: "example-repository",
owner: "example-owner",
retrieveBy: "tag",
releaseTag: "v1.0.0",
});
import pulumi
import pulumi_github as github
example = github.get_release(repository="example-repository",
owner="example-owner",
retrieve_by="tag",
release_tag="v1.0.0")
package main
import (
"github.com/pulumi/pulumi-github/sdk/v6/go/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := github.LookupRelease(ctx, &github.LookupReleaseArgs{
Repository: "example-repository",
Owner: "example-owner",
RetrieveBy: "tag",
ReleaseTag: pulumi.StringRef("v1.0.0"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var example = Github.GetRelease.Invoke(new()
{
Repository = "example-repository",
Owner = "example-owner",
RetrieveBy = "tag",
ReleaseTag = "v1.0.0",
});
});
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()
.repository("example-repository")
.owner("example-owner")
.retrieveBy("tag")
.releaseTag("v1.0.0")
.build());
}
}
variables:
example:
fn::invoke:
function: github:getRelease
arguments:
repository: example-repository
owner: example-owner
retrieveBy: tag
releaseTag: v1.0.0
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 LookupRelease(ctx *Context, args *LookupReleaseArgs, opts ...InvokeOption) (*LookupReleaseResult, error)
func LookupReleaseOutput(ctx *Context, args *LookupReleaseOutputArgs, opts ...InvokeOption) LookupReleaseResultOutput> Note: This function is named LookupRelease 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 - Deprecated: Use
assets_urlresource instead - Assets
List<Get
Release Asset> - Collection of assets for the release. Each asset conforms to the following schema:
- Assets
Url string - URL of any associated assets with the release
- Body string
- Contents of the description (body) of a release
- Created
At string - Date the asset was created
- 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
- The file name of the asset
- 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
- URL of the asset
- 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 - Deprecated: Use
assets_urlresource instead - Assets
[]Get
Release Asset - Collection of assets for the release. Each asset conforms to the following schema:
- Assets
Url string - URL of any associated assets with the release
- Body string
- Contents of the description (body) of a release
- Created
At string - Date the asset was created
- 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
- The file name of the asset
- 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
- URL of the asset
- 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 - Deprecated: Use
assets_urlresource instead - assets
List<Get
Release Asset> - Collection of assets for the release. Each asset conforms to the following schema:
- assets
Url String - URL of any associated assets with the release
- body String
- Contents of the description (body) of a release
- created
At String - Date the asset was created
- 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
- The file name of the asset
- 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
- URL of the asset
- 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 - Deprecated: Use
assets_urlresource instead - assets
Get
Release Asset[] - Collection of assets for the release. Each asset conforms to the following schema:
- assets
Url string - URL of any associated assets with the release
- body string
- Contents of the description (body) of a release
- created
At string - Date the asset was created
- 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
- The file name of the asset
- 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
- URL of the asset
- 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 - Deprecated: Use
assets_urlresource instead - assets
Sequence[Get
Release Asset] - Collection of assets for the release. Each asset conforms to the following schema:
- assets_
url str - URL of any associated assets with the release
- body str
- Contents of the description (body) of a release
- created_
at str - Date the asset was created
- 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
- The file name of the asset
- 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
- URL of the asset
- 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 - Deprecated: Use
assets_urlresource instead - assets List<Property Map>
- Collection of assets for the release. Each asset conforms to the following schema:
- assets
Url String - URL of any associated assets with the release
- body String
- Contents of the description (body) of a release
- created
At String - Date the asset was created
- 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
- The file name of the asset
- 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
- URL of the asset
- zipball
Url String - Download URL of a specific release in
zipformat - release
Id Number - ID of release
- release
Tag String - Tag of release
Supporting Types
GetReleaseAsset
- Browser
Download stringUrl - Browser download URL
- Content
Type string - MIME type of the asset
- Created
At string - Date the asset was created
- Id int
- ID of the asset
- Label string
- Label for the asset
- Name string
- The file name of the asset
- Node
Id string - Node ID of the asset
- Size int
- Size in byte
- Updated
At string - Date the asset was last updated
- Url string
- URL of the asset
- Browser
Download stringUrl - Browser download URL
- Content
Type string - MIME type of the asset
- Created
At string - Date the asset was created
- Id int
- ID of the asset
- Label string
- Label for the asset
- Name string
- The file name of the asset
- Node
Id string - Node ID of the asset
- Size int
- Size in byte
- Updated
At string - Date the asset was last updated
- Url string
- URL of the asset
- browser
Download StringUrl - Browser download URL
- content
Type String - MIME type of the asset
- created
At String - Date the asset was created
- id Integer
- ID of the asset
- label String
- Label for the asset
- name String
- The file name of the asset
- node
Id String - Node ID of the asset
- size Integer
- Size in byte
- updated
At String - Date the asset was last updated
- url String
- URL of the asset
- browser
Download stringUrl - Browser download URL
- content
Type string - MIME type of the asset
- created
At string - Date the asset was created
- id number
- ID of the asset
- label string
- Label for the asset
- name string
- The file name of the asset
- node
Id string - Node ID of the asset
- size number
- Size in byte
- updated
At string - Date the asset was last updated
- url string
- URL of the asset
- browser_
download_ strurl - Browser download URL
- content_
type str - MIME type of the asset
- created_
at str - Date the asset was created
- id int
- ID of the asset
- label str
- Label for the asset
- name str
- The file name of the asset
- node_
id str - Node ID of the asset
- size int
- Size in byte
- updated_
at str - Date the asset was last updated
- url str
- URL of the asset
- browser
Download StringUrl - Browser download URL
- content
Type String - MIME type of the asset
- created
At String - Date the asset was created
- id Number
- ID of the asset
- label String
- Label for the asset
- name String
- The file name of the asset
- node
Id String - Node ID of the asset
- size Number
- Size in byte
- updated
At String - Date the asset was last updated
- url String
- URL of the asset
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 v6.12.1
published on Thursday, Feb 12, 2026 by Pulumi
published on Thursday, Feb 12, 2026 by Pulumi
