Skip to content

Commit

Permalink
Update outdated changelog-updater.yml workflow (#1281)
Browse files Browse the repository at this point in the history
* fix: bring changelog updater changes from main to release/1.3.x

* Apply suggestions from code review

Co-authored-by: Michael Tarnawa <[email protected]>

---------

Co-authored-by: Michael Tarnawa <[email protected]>
  • Loading branch information
JuanPedroGHM and mtar authored Dec 22, 2023
1 parent d19f024 commit d529fc8
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/changelog-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: main

repository: helmholtz-analytics/heat
ref: ${{ github.event.release.target_commitish }}
- name: Update Changelog
uses: stefanzweifel/changelog-updater-action@v1
with:
release-notes: ${{ github.event.release.body }}
latest-version: ${{ github.event.release.name }}

env:
NAME: ${{ github.event.release.name }}
BODY: ${{ github.event.release.body }}
run: |
echo ${{ format('\# {0} - {1}', env.GITHUB_REF, "$NAME") }} > cl_title.md
echo "$BODY" > cl_new_body.md
echo "" > newline.txt
cat cl_title.md newline.txt cl_new_body.md newline.txt CHANGELOG.md > tmp
mv tmp CHANGELOG.md
rm cl_title.md
rm cl_new_body.md
rm newline.txt
cat CHANGELOG.md
- name: Commit updated CHANGELOG
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: release/1.2.x
branch: ${{ github.event.release.target_commitish }}
commit_message: Update CHANGELOG
file_pattern: CHANGELOG.md

0 comments on commit d529fc8

Please sign in to comment.