Skip to content

ci: add 'Release PR Changelog' GitHub action #6

ci: add 'Release PR Changelog' GitHub action

ci: add 'Release PR Changelog' GitHub action #6

name: Update PR Comment with Changelog
on:
pull_request:
branches:
- master
jobs:
update-pr-comment:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install dependencies
run: npm install -g conventional-changelog-cli
- name: Generate Changelog
id: changelog
run: echo "::set-output name=changelog::$(conventional-changelog -s)"
- name: Update PR comment
uses: unsplash/comment-on-pr@v1
with:
msg: ${{ steps.changelog.outputs.changelog }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}