Skip to content
Open
Show file tree
Hide file tree
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
32 changes: 20 additions & 12 deletions .github/workflows/generate-release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -132,7 +133,7 @@ jobs:
for f in "${all_files_for_section[@]}"; do
fname=$(basename "$f")
[[ "$fname" =~ ^([0-9]+)\. ]] && echo "${BASH_REMATCH[1]} $f"
done | sort -n | awk '{print $2}'
done | sort -n | cut -d' ' -f2-
))
unset IFS

Expand Down Expand Up @@ -170,14 +171,21 @@ jobs:
echo "Generated ${OUTPUT}:"
cat "${OUTPUT}"

- name: Commit and push
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add "docs/release notes/${{ inputs.version }}/${{ inputs.version }}.md"
if git diff --cached --quiet; then
echo "Output file is unchanged — nothing to commit."
else
git commit -m "Generate release notes for ${{ inputs.version }}"
git push
fi
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: release-notes/${{ inputs.version }}
base: main
author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
add-paths: |
docs/release notes/${{ inputs.version }}/${{ inputs.version }}.md
commit-message: "Generate release notes for ${{ inputs.version }}"
title: "docs: release notes for ${{ inputs.version }}"
body: |
Generated by the **Generate Release Notes** workflow.

Assembled release notes for **${{ inputs.version }}** from source files in `docs/release notes/${{ inputs.version }}/`.

Review `docs/release notes/${{ inputs.version }}/${{ inputs.version }}.md` before merging.
labels: documentation
Loading
Loading