Skip to content

Latest commit

 

History

History
72 lines (61 loc) · 2.72 KB

File metadata and controls

72 lines (61 loc) · 2.72 KB

Get a release

Get a created release Requires the content: write permission to work.

Inputs

Name Description Default
release-id (*) The ID of the release N/A
github-token The default token to use for this Git operation. If unspecified, this will default to github.token. "${{ github.token }}"
owner The repository owner. If unspecified, this will default to the owner of the current repository. ""
repo The name of the repository. If unspecified, this will default to the current repository. ""
retries The number of times to attempt to retry if this fails. "0"
retry-exempt-status-codes A list of error-codes that are exempt from being retried. "400,401,403,404,422"

Note: (*) marks required inputs

Outputs

Name Description
api-url The API URL for the release
body The body of the release
draft Whether this release is a draft release
name The name/title of the release
prerelease Whether this release is a pre-release
release-id The ID of the release
tag-name The name of the git tag associated to this release
target-commitish The commit that this release tracks
url A browser-friendly URL to the release page

Example

Here is a very basic example of how to use the releases/get composite action in a project (placeholders are used in place of real inputs):

run:
  example-job:
    # ... 
    steps:
      # ... 
      - name: Get a release
        id: releases-get # only necessary if using this action's output(s)
        uses: bitwizeshift/actions-github/releases/get@v1
        with:
          # Required inputs
          release-id: RELEASE_ID

          # Optional inputs
          github-token: GITHUB_TOKEN
          owner: OWNER
          repo: REPO
          retries: RETRIES
          retry-exempt-status-codes: RETRY_EXEMPT_STATUS_CODES
      # ... 
      - name: Uses "Get a release" Outputs
        uses: example-actions/use-releases-get@v3 # illustrative
        with:
          use-api-url: ${{ steps.releases-get.outputs.api-url }}
          use-body: ${{ steps.releases-get.outputs.body }}
          use-draft: ${{ steps.releases-get.outputs.draft }}
          use-name: ${{ steps.releases-get.outputs.name }}
          use-prerelease: ${{ steps.releases-get.outputs.prerelease }}
          use-release-id: ${{ steps.releases-get.outputs.release-id }}
          use-tag-name: ${{ steps.releases-get.outputs.tag-name }}
          use-target-commitish: ${{ steps.releases-get.outputs.target-commitish }}
          use-url: ${{ steps.releases-get.outputs.url }}