Skip to content

A simple Github actions for generate release note in github

Notifications You must be signed in to change notification settings

vhermawan/generator-release-notes

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

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generator Release Notes

This repository provides a GitHub action to automatically create a release notes after you creating a tag and wants to create a release notes

Common usage

Every time you merged your pull request for creating pre-release or release, this Github actions will be running and automatically generate release-notes.

Preresquite

You must create a tag, before use this Github Actions. If you don't create the tag this Github actions will be failed to generate your release notes. You can use standard-version for generate your tag and changelog.md file.

Flow

You can see the flow, how this Github actions working:

Release flow

Setup Yaml

You can running this Github actions only in some condition you can use label in pull request. First create a yaml file into your root project directory: .github/workflows/generate-release-note.yml:

name: Generate Release Notes
on:
  workflow_call:

jobs:
  get-commits:
    runs-on: ubuntu-latest
    steps:
    - name: Check out repository
      uses: actions/checkout@v3
      with:
        fetch-depth: 0
        ref: 'main'

    - name: Generate release notes
      uses: vhermawan/[email protected]
      with:
        owner: <your-username>
        token: ${{ github.token }}
        repository: <your-repository-name>

Now you can create a new yaml file, this yaml file will be running in each you create a pull request. This is a example, Github actions generator-release-note will be running if your pull request has a release label

name: Pull Request

on:
  pull_request:
    branches:
      - main

jobs:
  pull-request:
    timeout-minutes: 30
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

  generate-release-notes:
    if: contains(github.event.pull_request.labels.*.name, 'release')
    needs: pull-request
    uses: ./.github/workflows/generate-release-note.yml
    secrets: inherit