Skip to content

Get latest (pre-)release's version of a repository, customized property name such as 'created_at' supported.

License

Notifications You must be signed in to change notification settings

fangqiuming/latest-release-version

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Latest Release Version

Action for getting latest (pre-)release's version of a repository, customized property name such as 'created_at' supported.

Usage

- name: Get latest release's version(tag_name) of \
    `https://github.com/actions/runner` using action
  id: get-version-action
  uses: fangqiuming/latest-release-version@v1.x
  with:
    repository: actions/runner
    token: ${{ secrets.GITHUB }}
- name: A/B Check
    if: steps.get-version-action.outputs.version != 'v2.289.1'
    uses: actions/github-script@v3
    with:
      script: |
        core.setFailed("${{ steps.get-version-action.outputs.version }} \
        and v2.289.1 are not equivalent!')

Inputs

Input Name Description Default Value
repository Repository name with owner. For example, actions/runner ${{ github.repository }}
token Personal access token (PAT) used to read the repository ${{ github.token }}
property Property name refers to version in response object tag_name
include_pre Should pre-release be included. 'false'

Output

Output Name Description
tag_name Tag name of the repository's latest release. For example, v2.289.1
version Version value based on preferred property name. Output v0.0.0 if repository has no release

About

Get latest (pre-)release's version of a repository, customized property name such as 'created_at' supported.

Topics

Resources

License

Stars

Watchers

Forks