Class GetRelease
Inheritance
System.Object
GetRelease
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Github
Assembly: Pulumi.Github.dll
Syntax
public static class GetRelease
Methods
View SourceInvokeAsync(GetReleaseArgs, InvokeOptions)
Use this data source to retrieve information about a GitHub release in a specific repository.
{{% examples %}}
Example Usage
{{% example %}} To retrieve the latest release that is present in a repository:
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Github.GetRelease.InvokeAsync(new Github.GetReleaseArgs
{
Owner = "example-owner",
Repository = "example-repository",
RetrieveBy = "latest",
}));
}
}
To retrieve a specific release from a repository based on it's ID:
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Github.GetRelease.InvokeAsync(new Github.GetReleaseArgs
{
Id = 12345,
Owner = "example-owner",
Repository = "example-repository",
RetrieveBy = "id",
}));
}
}
Finally, to retrieve a release based on it's tag:
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Github.GetRelease.InvokeAsync(new Github.GetReleaseArgs
{
Owner = "example-owner",
ReleaseTag = "v1.0.0",
Repository = "example-repository",
RetrieveBy = "tag",
}));
}
}
{{% /example %}} {{% /examples %}}
Declaration
public static Task<GetReleaseResult> InvokeAsync(GetReleaseArgs args, InvokeOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetReleaseArgs | args | |
| InvokeOptions | options |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<GetReleaseResult> |