Skip to content

Get-GitHubReleaseAsset

SYNOPSIS

List release assets based on a release ID, asset ID, or asset name

SYNTAX

List assets from the latest release (Default)

Get-GitHubReleaseAsset -Owner <string> -Repository <string> [-Name <string>] [-PerPage <int>]
 [-Context <Object>] [<CommonParameters>]

Get a specific asset by ID

Get-GitHubReleaseAsset -Owner <string> -Repository <string> -ID <string> [-Name <string>]
 [-Context <Object>] [<CommonParameters>]

List assets from a release by ID

Get-GitHubReleaseAsset -Owner <string> -Repository <string> -ReleaseID <string> [-Name <string>]
 [-PerPage <int>] [-Context <Object>] [<CommonParameters>]

List assets from a release by tag

Get-GitHubReleaseAsset -Owner <string> -Repository <string> -Tag <string> [-Name <string>]
 [-PerPage <int>] [-Context <Object>] [<CommonParameters>]

ALIASES

This cmdlet has the following aliases, {{Insert list of aliases}}

DESCRIPTION

If an asset ID is provided, the asset is returned. If a release ID is provided, all assets for the release are returned. If a release ID and name are provided, the specific named asset from that release is returned. If a tag and name are provided, the specific named asset from the release with that tag is returned.

EXAMPLES

EXAMPLE 1

Get-GitHubReleaseAsset -Owner 'octocat' -Repository 'hello-world' -ID '1234567'

Gets the release asset with the ID '1234567' for the repository 'octocat/hello-world'.

EXAMPLE 2

Get-GitHubReleaseAsset -Owner 'octocat' -Repository 'hello-world' -ReleaseID '7654321'

Gets all release assets for the release with the ID '7654321' for the repository 'octocat/hello-world'.

EXAMPLE 3

Get-GitHubReleaseAsset -Owner 'octocat' -Repository 'hello-world' -ReleaseID '7654321' -Name 'example.zip'

Gets the release asset named 'example.zip' from the release with ID '7654321' for the repository 'octocat/hello-world'.

EXAMPLE 4

Get-GitHubReleaseAsset -Owner 'octocat' -Repository 'hello-world' -Tag 'v1.0.0' -Name 'example.zip'

Gets the release asset named 'example.zip' from the release tagged as 'v1.0.0' for the repository 'octocat/hello-world'.

PARAMETERS

-Context

The context to run the command in. Used to get the details for the API call. Can be either a string or a GitHubContext object.

Type: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ID

The unique identifier of the asset.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Get a specific asset by ID
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Name

The name of the asset to get. If specified, only assets with this name will be returned.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Owner

The account owner of the repository. The name is not case sensitive.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases:
- Organization
- User
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-PerPage

The number of results per page (max 100).

Type: System.Nullable`1[System.Int32]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: List assets from a release by tag
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: List assets from a release by ID
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: List assets from the latest release
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ReleaseID

The unique identifier of the release.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases:
- Release
ParameterSets:
- Name: List assets from a release by ID
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Repository

The name of the repository without the .git extension. The name is not case sensitive.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Tag

The tag name of the release.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: List assets from a release by tag
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

GitHubRelease

{{ Fill in the Description }}

System.String

{{ Fill in the Description }}

OUTPUTS

GitHubReleaseAsset

{{ Fill in the Description }}

NOTES