Download GitHub Release task
Azure Pipelines
Use this task in your pipeline to download assets from your GitHub release as part of your CI/CD pipeline.
Prerequisites
GitHub service connection
This task requires a GitHub service connection with Read permission to the GitHub repository. You can create a GitHub service connection in your Azure Pipelines project. Once created, use the name of the service connection in this task's settings.
YAML snippet
# Download GitHub Release
# Downloads a GitHub Release from a repository
- task: DownloadGitHubRelease@0
inputs:
connection:
userRepository:
#defaultVersionType: 'latest' # Options: latest, specificVersion, specificTag
#version: # Required when defaultVersionType != Latest
#itemPattern: '**' # Optional
#downloadPath: '$(System.ArtifactsDirectory)'
Arguments
| Argument | Description |
|---|---|
connection GitHub Connection |
(Required) Enter the service connection name for your GitHub connection. Learn more about service connections here. |
userRepository Repository |
(Required) Select the name of GitHub repository in which GitHub releases will be downloaded from. |
defaultVersionType Default version |
(Required) The version of the GitHub Release from which the assets are downloaded. The version type can be 'Latest Release', 'Specific Version' or 'Specific Tag' Default value: latest |
version Release |
(Required) This option shows up if 'Specific Version' or 'Specific Tag' is selected as Default Release version type. Based on the version type selected, Release name or the Tag needs to be provided. |
itemPattern Item pattern |
(Optional) Minimatch pattern to filter files to be downloaded from the available release assets. To download all files within release use **. |
downloadPath Destination directory |
(Required) Path on the agent machine where the release assets will be downloaded. Default value: $(System.ArtifactsDirectory) |
Open source
This task is open source on GitHub. Feedback and contributions are welcome.