From 79805bc1c4a4db517bbb14b05b43c76ff185d5a6 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 8 Feb 2022 15:36:57 +0100 Subject: [PATCH] [8.x] Auto update changelog file with a new release (#5801) * Create update-changelog.md * Update .gitattributes * Rename update-changelog.md to update-changelog.yml --- .gitattributes | 11 +++++++--- .github/workflows/update-changelog.yml | 29 ++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/update-changelog.yml diff --git a/.gitattributes b/.gitattributes index 967315dd..510d9961 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,10 @@ * text=auto -*.css linguist-vendored -*.scss linguist-vendored -*.js linguist-vendored + +*.blade.php diff=html +*.css diff=css +*.html diff=html +*.md diff=markdown +*.php diff=php + +/.github export-ignore CHANGELOG.md export-ignore diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml new file mode 100644 index 00000000..0200e2b9 --- /dev/null +++ b/.github/workflows/update-changelog.yml @@ -0,0 +1,29 @@ +name: "Update Changelog" + +on: + release: + types: [released] + +jobs: + update: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: ${{ github.ref_name }} + + - name: Update Changelog + uses: stefanzweifel/changelog-updater-action@v1 + with: + latest-version: ${{ github.event.release.tag_name }} + release-notes: ${{ github.event.release.body }} + compare-url-target-revision: ${{ github.event.release.target_commitish }} + + - name: Commit updated CHANGELOG + uses: stefanzweifel/git-auto-commit-action@v4 + with: + branch: ${{ github.event.release.target_commitish }} + commit_message: Update CHANGELOG.md + file_pattern: CHANGELOG.md