Skip to content

chore(components): bump the minorandpatch group in /components with 21 updates #239

chore(components): bump the minorandpatch group in /components with 21 updates

chore(components): bump the minorandpatch group in /components with 21 updates #239

name: Changelog Preview
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:
previewChangelog:
name: Preview Changelog
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- name: Install npm packages
run: npm ci
- name: Generate Changelog Preview
id: changelog-preview
run: |
changelog=$(npm run --silent release-please-changelog-preview -- --token=${{ secrets.GITHUB_TOKEN }} --target-branch=${{ github.head_ref || github.ref_name }})
echo "changelog<<EOF
$changelog
EOF" >> "$GITHUB_OUTPUT"
- name: Comment on PR
uses: marocchino/sticky-pull-request-comment@v2
if: ${{ steps.changelog-preview.outputs.changelog != '' }}
with:
skip_unchanged: true
header: changelogPreview
message: |
This is a preview of the changelog of the next release. If this branch is not up-to-date with the current main branch, the changelog may not be accurate. Rebase your branch on the main branch to get the most accurate changelog.
Note that this might contain changes that are on main, but not yet released.
Changelog:
${{ steps.changelog-preview.outputs.changelog }}
- name: Delete PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: ${{ steps.changelog-preview.outputs.changelog == '' }}
with:
skip_unchanged: true
header: changelogPreview
message: |
There is no change in the changelog. This PR will not produce a new releasable version.