diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml index 4487525c..bdb943b0 100644 --- a/.github/workflows/release-please.yaml +++ b/.github/workflows/release-please.yaml @@ -18,6 +18,24 @@ jobs: token: ${{secrets.GITHUB_TOKEN}} default-branch: main + # The logic to run the changelog through prettier + - name: Checkout Repository + uses: actions/checkout@v4 + if: ${{ steps.release.outputs.prs_created }} + with: + ref: ${{ fromJson(steps.release.outputs.pr).headBranchName }} + + - name: Run CHANGELOG.md through Prettier + if: ${{ steps.release.outputs.prs_created }} + run: npx prettier --write **/CHANGELOG.md + + - name: Commit and push + if: ${{ steps.release.outputs.prs_created }} + run: | + git add **/CHANGELOG.md + git commit --amend --no-edit --no-verify + git push + # The logic below handles the npm publication: - name: Checkout Repository uses: actions/checkout@v4