File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -66,12 +66,26 @@ jobs:
6666 git push origin "${{ steps.versions.outputs.release }}"
6767
6868 '
69+ - name : Generate release text
70+ id : release-body
71+ run : " set -x\n # Get the most recent commit. Hopefully it was a PR merge.\n COMMIT=$(jq\
72+ \ -r '.after' ${{ github.event_path }})\n if [ \" ${COMMIT}\" = \" null\" ] ||\
73+ \ [ -z \" ${COMMIT}\" ] ; then\n exit 0\n fi\n # Get the most recent PRs; hopefully\
74+ \ ours is one of them.\n curl -fSs -H \" Accept: application/vnd.github+json\" \
75+ \ \\\n -H \" Authorization: Bearer ${{ secrets.WORKFLOW_PAT }}\" \\\n https://api.github.com/repos/${{\
76+ \ github.repository }}/pulls?state=all\\ &base=${{ github.ref }}\\ &sort=updated\\ \
77+ &direction=desc > /tmp/prs.json\n # Find a PR that resulted in our commit.\n \
78+ PR=$(jq -r \" .[] | select(.merge_commit_sha == \\\" ${COMMIT}\\\" ) | .number\" \
79+ \ /tmp/prs.json)\n if [ \" ${PR}\" = \" null\" ] || [ -z \" ${PR}\" ] ; then\n \
80+ \ exit 0\n fi\n # Build the string we'll use as the description of the release.\n \
81+ echo \" ::set-output name=body::latest_pr:${PR}\"\n "
6982 - name : Create prerelease
7083 uses : ncipollo/release-action@v1
7184 with :
7285 token : ${{ secrets.WORKFLOW_PAT }}
7386 prerelease : true
7487 tag : ${{ steps.versions.outputs.release }}
88+ body : ${{ steps.release-body.outputs.body }}
7589 - name : Set development version
7690 run : ' .github/bump-version.set.sh "${{ steps.versions.outputs.bumped }}"
7791
You can’t perform that action at this time.
0 commit comments