Skip to content
play

GitHub Action

Get Commit Summary

v3 Latest version

Get Commit Summary

play

Get Commit Summary

Get commits from previrous tag to new tag

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Get Commit Summary

uses: kristiyan-petrov/commit-summary@v3

Learn more about this action in kristiyan-petrov/commit-summary

Choose a version

Github Actions - Get commit summary

Get the commits from the previous tag.

Inputs

  • ref: ${{ GitHub.ref }}. The new tag.

Outputs

  • summary: The hash commits and commit messages

example

a722eac replace step
6e5bf22 create action for get commit summary

example.png

Example workflow

name: Release

on:
  push:
    tags:
      - 'v*'
jobs:
  build:
    name: Create Release
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

      # get commit summary
      - name: Get commit summary
        uses: actions/commit-summary@v1
        id: get_commit_summary
        with:
          ref: ${{ github.ref }}

      # create release
      - name: Create Release
        id: create_release
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ github.ref }}
          release_name: Release ${{ github.ref }}
          body: |
            ${{ steps.get_commit_summary.outputs.summary }}
          draft: false
          prerelease: false