Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/auto-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ jobs:
echo "base=$base_branch" >> $GITHUB_OUTPUT
exit 0
fi
git checkout "$base_branch"
# Force checkout of remote branch to avoid tag ambiguity and ensure correct base
git checkout -B "$base_branch" "origin/$base_branch"
if grep -q "^$version$" docs/change_log.md; then
echo "Already present in changelog."; upd=false
else
Expand All @@ -59,12 +60,16 @@ jobs:
echo 'Preview:'
grep -n "^${{ steps.detect.outputs.version }}$" -A12 docs/change_log.md || true

- name: Stage changes
- name: Commit changes
if: ${{ steps.detect.outputs.update == 'true' }}
run: |
set -e
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
branch=chore/changelog-${{ steps.detect.outputs.version }}
git checkout -B "$branch"
git add docs/change_log.md
git commit -m "chore: add changelog for ${{ steps.detect.outputs.version }}"

- name: Create Pull Request
if: ${{ steps.detect.outputs.update == 'true' }}
Expand Down
Loading