diff --git a/.github/workflows/pre_release_workflow.yml b/.github/workflows/pre_release_workflow.yml index b47331608..147e93ea4 100644 --- a/.github/workflows/pre_release_workflow.yml +++ b/.github/workflows/pre_release_workflow.yml @@ -36,3 +36,15 @@ jobs: git commit -m ${{steps.pin_versions.outputs.COMMIT_MESSAGE}} git tag ${{inputs.tagName}} git push origin ${{inputs.tagName}} + - name: Create Release + env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + run: gh release create --generate-notes --draft ${{inputs.tagName}} + - name: Edit Release Notes + env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + run: | + BODY_JSON=$(gh release view ${{inputs.tagName}} --json body) + cat "${{steps.pin_versions.outputs.COMMIT_MESSAGE}}\n\n" > "$RUNNER_TEMP/relnotes.txt" + cat ${{fromJSON($BODY_JSON)}}.body >> "$RUNNER_TEMP/relnotes.txt" + gh release edit --notes-file < "$RUNNER_TEMP/relnotes.txt"