Skip to content

Commit

Permalink
fix(ci): sed [unreleased] in Changelog
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Engelhardt <antoncengelhardt@icloud.com>
  • Loading branch information
antonengelhardt committed Jun 6, 2024
1 parent e677379 commit 28e8bc7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ jobs:
SEMVER_BUMP="patch"
else
SEMVER_BUMP="none"
echo "EXIT=1" >> $GITHUB_ENV
exit 0 # exit if no labels are found, which means no version bump is required
fi
Expand Down Expand Up @@ -277,6 +278,16 @@ jobs:
env:
GITHUB_REPO: ${{ github.repository }}

- name: sed [unreleased] with new version in CHANGELOG.md
if: env.EXIT != '1'
run: sed -i "s/\[unreleased\]/[${{ env.NEW_TAG }}]/" CHANGELOG.md

- name: sed [unreleased] with new version in RELEASE_NOTES.md
if: env.EXIT != '1'
run: |
cat ${{ steps.generate_changelog.outputs.changelog }} > RELEASE_NOTES.md
sed -i "s/\[unreleased\]/[${{ env.NEW_TAG }}]/" RELEASE_NOTES.md
- name: Print Changelog
if: env.EXIT != '1'
run: cat ${{ steps.generate_changelog.outputs.changelog }} && echo "##" && cat CHANGELOG.md
Expand Down Expand Up @@ -314,6 +325,6 @@ jobs:
with:
tag_name: ${{ env.NEW_TAG }}
release_name: ${{ env.NEW_TAG }}
body_path: ${{ steps.generate_changelog.outputs.changelog }}
body_path: RELEASE_NOTES.md
draft: false
prerelease: false

0 comments on commit 28e8bc7

Please sign in to comment.