Skip to content

release-exists-action

Actions

About

Checks if a given release exists
v1.1.0
Latest
Star (0)

release-exists-action

A GitHub action that determines if a release exists in a repo.

If a release is found it will additionally return information about it such as:

  • Pre-release status
  • Draft status
  • Name
  • Url

Additionally see: tag-exists-action

Inputs

tag

Required - Tag to search a matching release for.

repo

Optional - Repo you'd like to search, in owner/repo-name format.

Outputs

exists

A string value of 'true' or 'false'

prerelease

A string value of 'true' or 'false'

draft

A string value of 'true' or 'false'

name

If found, the name of the release.

url

If found, the url of the release.

Example usages

To check if a release with the tag v1.0 exists in your repo:

- uses: mukunku/release-exists-action@v1.1.0
  id: check-release
  with: 
    tag: 'v1.0'

- run: echo "Release exists!"
  if: steps.check-release.outputs.exists == 'true' 

To check if a non-draft release with the tag v1.0.0 exists in the repo actions/checkout:

- uses: mukunku/release-exists-action@v1.1.0
  id: check-release
  with: 
    tag: 'v1.0.0'
    repo: 'actions/checkout'

- run: | 
    echo "Release exists and is not a draft!"
    echo "${{ steps.check-release.outputs.name }}"
    echo "${{ steps.check-release.outputs.url }}"
    echo "${{ steps.check-release.outputs.prerelease }}"
  if: steps.check-release.outputs.exists == 'true' && steps.check-release.outputs.draft == 'false'

This action uses the ${{github.token}} secret to automatically inject your access token. If you'd like to provide your own token instead check out this help article.

release-exists-action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Checks if a given release exists
v1.1.0
Latest

release-exists-action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.