GitHub Release task

Azure Pipelines

Use this task in your pipeline to create, edit, or discard a GitHub release.


GitHub service connection

This task requires a GitHub service connection with Write 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

# GitHub Release
# Create, edit, or discard a GitHub release.
- task: GithubRelease@0
    #action: 'create' # Options: create, edit, discard
    #target: '$(build.sourceVersion)' # Required when action == create || action == edit
    #tagSource: 'auto' # Required when action == create. Options: auto, manual
    #tag: # Required when action == edit || action == discard || tagSource == manual
    #title: # Optional
    #releaseNotesSource: 'file' # Optional. Options: file, input
    #releaseNotesFile: # Optional
    #releaseNotes: # Optional
    #assets: '$(build.artifactStagingDirectory)/*' # Optional
    #assetUploadMode: 'delete' # Optional. Options: delete, replace
    #isDraft: false # Optional
    #isPreRelease: false # Optional
    #addChangeLog: true # Optional


GitHub Connection(Required) Enter the service connection name for your GitHub connection. Learn more about service connections here.
Repository(Required) Select the name of GitHub repository in which GitHub releases will be created.
Action(Required) Select the type of release operation you want perform. This task can create, edit, or discard a GitHub release.
Target(Required) This is the commit SHA for which the GitHub release will be created. E.g. 48b11d8d6e92a22e3e9563a3f643699c16fd6e27. You can also use variables here.
Tag source(Required) Configure the tag to be used for release creation. The 'Git tag' option automatically takes the tag which is associated with this commit. Use the 'User specified tag' option in case you want to manually provide a tag.
Tag(Required) Specify the tag for which you want to create, edit, or discard a release. You can also use variables here. E.g. $(tagName).
Release title(Optional) Specify the title of the GitHub release. If left empty, the tag will be used as the release title.
Release notes source(Optional) Specify the description of the GitHub release. Use the 'Release notes file' option to use the contents of a file as release notes. Use the 'Inline release notes' option to manually enter the release notes.
Release notes file path(Optional) Select the file which contains the release notes.
Release notes(Optional) Type your release notes here. Markdown is supported.
Assets(Optional) Specify the files to be uploaded as assets for the release. You can use wildcard characters to specify a set of files. E.g. $(Build.ArtifactStagingDirectory)/*.zip. You can also specify multiple patterns - one per line. By default, all files in the $(Build.ArtifactStagingDirectory) directory will be uploaded.
Asset upload mode(Optional) Use the 'Delete existing assets' option to first delete any existing assets in the release and then upload all assets. Use the 'Replace existing assets' option to replace any assets that have the same name.
Draft release(Optional) Indicate whether the release should be saved as a draft (unpublished). If false, the release will be published.
Pre-release(Optional) Indicate whether the release should be marked as a pre-release.
Add changelog(Optional) If set to true, a list of changes (commits and issues) between this and the last published release will be generated and appended to release notes.
Control options

Open source

This task is open source on GitHub. Feedback and contributions are welcome.