Skip to content

This GitHub Action finds the most recent matching tag.

License

Notifications You must be signed in to change notification settings

rmeneely/git-last-tag

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

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

git-last-tag

This GitHub Action determines returns the most recent matching tag, setting the ${{ env.LAST_TAG }} environment variable.

Usage

    - uses: rmeneely/git-last-tag@v1
      with:
        # Tag pattern. The filter to use when searching for the LAST_VERSION tag
        # Optional
        # Default: 'v[0-9]*.[0-9]*.[0-9]*'
        tag_pattern: 'v[0-9]*.[0-9]*.[0-9]*'
        # Ignore tag pattern: Exclude matching tags from the tag pattern
        # Optional
        # Default: ''
        ignore_tag_pattern: ''

Examples

    # Sets LAST_TAG environment variable to last matching tag
    # Example:
    - uses: rmeneely/git-last-tag@v1
    # Sets LAST_TAG environment variable to last matching tag, excluding the tag v1.2.3
    # Example:
    - uses: rmeneely/git-last-tag@v1
      with:
        tag_pattern: 'rc[0-9]*'
        ignore_tag_pattern: 'v1.2.3'

Output

# If run as GitHub Action - sets the following $GITHUB_ENV variable
# If run as script - prints the following variables
LAST_TAG=<last tag>

License

The MIT License (MIT)

About

This GitHub Action finds the most recent matching tag.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages