Skip to content

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

License

Notifications You must be signed in to change notification settings

guilhermetod/semantic-release-notes-preview

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published