@@ -352,11 +352,52 @@ jobs:
352352 id : ${{ steps.get_release.outputs.id }}
353353 body : |
354354 ## Info
355- [See code diff](${{ github.event.compare }})
356355 [Release workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) - Workflow ID: ${{ github.run_id }}
357356
358357 It was initialized by [${{ github.event.sender.login }}](${{ github.event.sender.html_url }})
359358
359+ - name : Checkout gh-pages branch
360+ if : ${{ !inputs.dry_run }}
361+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
362+ with :
363+ repository : ${{ github.repository }}
364+ ref : gh-pages
365+ path : gh-pages
366+
367+ - name : Publish release notes to gh-pages
368+ if : ${{ !inputs.dry_run }}
369+ working-directory : gh-pages
370+ env :
371+ RELEASE_ID : ${{ steps.get_release.outputs.id }}
372+ VERSION_TAG : ${{ steps.output_version_tag.outputs.VERSION_TAG }}
373+ GH_REPO : ${{ github.repository }}
374+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
375+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
376+ run : |
377+ set -euo pipefail
378+ notes_dir="release_notes"
379+ mkdir -p "$notes_dir"
380+ note_file="$notes_dir/${VERSION_TAG}.md"
381+
382+ gh api "/repos/${GH_REPO}/releases/${RELEASE_ID}" | jq -r '.body // ""' > "$note_file"
383+
384+ if [ ! -s "$note_file" ]; then
385+ echo "Release notes are empty; skipping gh-pages update."
386+ exit 0
387+ fi
388+
389+ git config user.name "github-actions[bot]"
390+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
391+
392+ git add -f "$note_file"
393+ if git diff --cached --quiet; then
394+ echo "No changes detected in release notes; skipping commit."
395+ exit 0
396+ fi
397+
398+ git commit -m "docs: add release notes for ${VERSION_TAG}"
399+ parallel --retries 10 --delay 3 ::: "git pull --rebase && git push"
400+
360401 - name : Output Change Set Version
361402 id : output_change_set_version
362403 shell : bash
0 commit comments