Skip to content

simbo/changes-between-tags-action

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

"Changes between Tags" Action

Action on GitHub Marketplace GitHub latest Release

A GitHub action to collect all changes between two git tags and provides them for further usage in a release description, a changelog entry or something similar.



About

This action collects all git commit messages between two git tags and provides them for further usage.

It uses the repository in the current working directory and fetches all tags from the origin remote.

A regex pattern tag-pattern can be defined to filter tags. Matching tags will be sorted and the latest two tags are taken for comparison.

The action will fail if no matching tags are found.

If only one matching tag is found, the changes from the initial commit to this tag will be collected.

The action is meant to be run on a push:tags event.

Usage

Inputs

Name Description Required Default
tag-pattern the regex pattern to filter tags No '^v?[0-9]+\.[0-9]+\.[0-9]+$'
validate-tag whether to check if the determined latest tag is the same tag that triggered the workflow No 'true'
include-tag-commit whether to include the commit with the current tag No 'true'
include-hashes whether or not each commit message should be prefixed with the corresponding hash No 'true'
line-prefix the prefix to add to every listed commit No '- '

Outputs

Name Description
changes collected changes as multiline string
tag the current/latest tag that was used for comparison
ref the git reference that the tag was compared with

Example

on:
  push:
    tags:
      - v*

jobs:
  ci:
    runs-on: ubuntu-22.04
    steps:
      - name: 🛎 Checkout
        uses: actions/checkout@v4
        with:
          # you need full history to collect changes correctly
          fetch-depth: 0

      - name: 📋 Get Changes between Tags
        id: changes
        uses: simbo/changes-between-tags-action@v1

      - name: 📣 Output Data
        run: |
          echo "tag: ${{ steps.changes.outputs.tag }}"
          echo "changes: ${{ steps.changes.outputs.changes }}"

License

MIT © 2023 Simon Lepel

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages