From 843d229c3d78d9643188a8ac0bdfcf8ddbc32e44 Mon Sep 17 00:00:00 2001 From: Quinn Casey Date: Thu, 12 May 2022 09:13:21 -0700 Subject: [PATCH] Append generated changelog to docs --- .github/release-drafter.yml | 5 +++-- .github/workflows/ci.yml | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index b52e08f35..16538820d 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -28,9 +28,10 @@ include-labels: replacers: # Changes "Feature: Update checker" to "Update checker" - search: '/Feature:|Feat:|\[feature\]/gi' replace: '' -change-template: '- $TITLE @$AUTHOR (#$NUMBER)' +category-template: '### $TITLE' +change-template: '- $TITLE [@$AUTHOR](https://github.com/$AUTHOR) ([#$NUMBER]($URL))' change-title-escapes: '\<*_&#@' template: | - # Changelog + ## paperless-ngx $RESOLVED_VERSION $CHANGES diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c17e2a210..0c907fa71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -381,3 +381,22 @@ jobs: asset_path: ./paperless-ngx.tar.xz asset_name: paperless-ngx-${{ steps.get_version.outputs.version }}.tar.xz asset_content_type: application/x-xz + - + name: Checkout + uses: actions/checkout@v3 + - + name: Append Changelog to docs + id: append-Changelog + working-directory: docs + run: | + git status + git pull origin main + git checkout main + echo -e "# Changelog\n\n${{ steps.create-release.outputs.body }}\n" > changelog-new.md + CURRENT_CHANGELOG=`tail --lines +2 changelog.md` + echo -e "$CURRENT_CHANGELOG" >> changelog-new.md + mv changelog-new.md changelog.md + git config --global user.name "github-actions" + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" + git commit -am "Changelog ${{ steps.get_version.outputs.version }} - GHA" + git push origin HEAD:main