Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.39 KB

README.md

File metadata and controls

37 lines (28 loc) · 1.39 KB

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/[email protected]
- 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.