Allows you to get a release information by release id, tag, commit SHA or get the last release.
If release not found, it finishes with an error.
Set exactly 1 input from the list to search release by:
Release id (number).
Tag name.
SHA of commit. Can be used to find a draft release.
Exact release name. Returns most recent found. Can be used to find a draft release.
Regexp to test release name
Set 1 or true to get the latest non-draft release.
If no inputs specified, the action will try to get release for the current commit SHA.
With any of inputs above you can also use 2 additional filter inputs:
Set true to search only for draft releases.
Set false to search only releases that are not draft.
Leave empty to not check if a release is a draft.
Set true to search only for prerelease releases.
Set false to search only releases that are not prerelease.
Leave empty to not check if a release is a prerelease.
Set true to force the action to finish with success even if release was not found.
Can be useful in composite actions, where continue-on-error is not available.
If set, you can examine id output to know if release was found.
If you use one of commitSha, releaseName,
releaseNameRegEx inputs you can also specify how many releases action should retrieve to perform
a search. Specify more than 90 if
you age going to search for old releases and less if you want to speed up the search.
Repository name in form of "owner/name". If not set, GITHUB_REPOSITORY env variable is used that by
default points to a current repository.
You should set GITHUB_TOKEN env variable to enable action to access GitHub API.
For some operations default github.token is not enough, you need to pass a personal access token.
Values from API response object:
html_urlupload_urlcan be used to upload assetstarball_urlzipball_urlidtag_nametarget_commitishnamebodydraftcontainstrueorfalsestring valueprereleasecontainstrueorfalsestring valuecreated_atpublished_aturlassets_urlnode_idauthor(JSON with author object)assets(JSON with assets object)
- uses: cardinalby/git-get-release-action@v1
env:
GITHUB_TOKEN: ${{ github.token }} # or your personal access token
with:
tag: '1.2.3' - uses: cardinalby/git-get-release-action@v1
env:
GITHUB_TOKEN: ${{ github.token }} # or your personal access token
with:
commitSha: e92acb19de8845ad1f3cb6cfab421ac26002d6b6
prerelease: falseFor more examples check out functional self-test.