diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 665f09064af..3d58d2ff009 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -125,6 +125,19 @@ jobs: run: | latest_release_tag=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases \ | jq -r 'sort_by(.created_at) | last(.[]).tag_name') + + # Generate release notes explicitly + release_notes=$(curl -s \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/${{ github.repository }}/releases/generate-notes \ + -d '{ + "tag_name": "${{ github.ref_name }}", + "previous_tag_name": "${latest_release_tag}", + }' | jq -r '.body') + curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ @@ -133,13 +146,12 @@ jobs: https://api.github.com/repos/${{ github.repository }}/releases \ -d '{ "tag_name": "${{ github.ref_name }}", - "previous_tag_name": "${latest_release_tag}", - "prerelease": ${{ contains(github.ref, 'beta') || contains(github.ref, 'rc') }} + "prerelease": ${{ contains(github.ref, 'beta') || contains(github.ref, 'rc') }}, + "body": "${release_notes}" }' - name: Create release assets uses: softprops/action-gh-release@v2 with: - generate_release_notes: true files: | dist/* upstream/*