diogokiss / semantic-release-notes-preview

A GitHub Action for previewing the release notes that will be generated by a given pull request

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Release Notes Preview

Generates and outputs a release notes preview

Usage

This actions uses semantic-release to generate a release notes preview.

In order to make semantic release work correctly, this actions must be run in the actual PR branch. This means you'll need to run @actions/checkout with fetch-depth: 0 so that we can get the PR branch. After this, you must simply use this action. No inputs required.

The preview will then be logged in your workflow's runs, but you can also use the output of this action in further actions.

The example below shows how to add a comment to a pull request with the release preview.

- name: Checkout repository
  uses: actions/checkout@v2
  with:
    fetch-depth: 0
- name: Generate release notes
  id: release-notes-preview
  uses: guilhermetod/semantic-release-notes-preview@v1.0.0
- name: Comment release notes preview
  uses: peter-evans/create-or-update-comment@v1
  with:
    issue-number: ${{ github.event.number }}
    body: |
    Thank you for you contribution. Below is a preview of the release notes if your PR gets merged.

    ---

    ${{ steps.release-notes-preview.outputs.releaseNotes }}

License

This project is released under the MIT License.

About

A GitHub Action for previewing the release notes that will be generated by a given pull request

License:MIT License


Languages

Language:TypeScript 58.1%Language:JavaScript 40.7%Language:Shell 1.2%