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 <Int32>]
[-Context <Object>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Get a specific asset by ID¶
Get-GitHubReleaseAsset -Owner <String> -Repository <String> -ID <String> [-Name <String>] [-Context <Object>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
List assets from a release by ID¶
Get-GitHubReleaseAsset -Owner <String> -Repository <String> -ReleaseID <String> [-Name <String>]
[-PerPage <Int32>] [-Context <Object>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
List assets from a release by tag¶
Get-GitHubReleaseAsset -Owner <String> -Repository <String> -Tag <String> [-Name <String>] [-PerPage <Int32>]
[-Context <Object>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
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¶
-Owner¶
The account owner of the repository. The name is not case sensitive.
Type: String
Parameter Sets: (All)
Aliases: Organization, User
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Repository¶
The name of the repository without the .git extension. The name is not case sensitive.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-ID¶
The unique identifier of the asset.
Type: String
Parameter Sets: Get a specific asset by ID
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ReleaseID¶
The unique identifier of the release.
Type: String
Parameter Sets: List assets from a release by ID
Aliases: Release
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Tag¶
The tag name of the release.
Type: String
Parameter Sets: List assets from a release by tag
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Name¶
The name of the asset to get. If specified, only assets with this name will be returned.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PerPage¶
The number of results per page (max 100).
Type: Int32
Parameter Sets: List assets from the latest release, List assets from a release by ID, List assets from a release by tag
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-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: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: (Get-GitHubContext)
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction¶
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters¶
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS¶
GitHubRelease¶
OUTPUTS¶
GitHubReleaseAsset¶
NOTES¶
RELATED LINKS¶
https://psmodule.io/GitHub/Functions/Releases/Assets/Get-GitHubReleaseAsset