From 7acf9680e651092b74599d4d68dd481e6f6ac8f9 Mon Sep 17 00:00:00 2001 From: Paco8 <5084042+Paco8@users.noreply.github.com> Date: Sat, 24 Apr 2021 14:56:09 +0200 Subject: [PATCH] Add update-release.yml --- .github/workflows/update-release.yml | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/update-release.yml diff --git a/.github/workflows/update-release.yml b/.github/workflows/update-release.yml new file mode 100644 index 0000000..25c2094 --- /dev/null +++ b/.github/workflows/update-release.yml @@ -0,0 +1,33 @@ +name: Update changelog in release + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Get version from tag + id: tag_name + run: echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v} + + - name: Get changelog entry + id: changelog_reader + uses: mindsers/changelog-reader-action@v2 + with: + version: ${{ steps.tag_name.outputs.current_version }} + path: ./Changelog.md + + - name: Update release + id: update_release + uses: tubone24/update_release@v1.0 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + release_name: ${{ steps.changelog_reader.outputs.version }} + body: ${{ steps.changelog_reader.outputs.changes }}