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:
66
66
git push origin "${{ steps.versions.outputs.release }}"
67
67
68
68
'
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 "
69
82
- name : Create prerelease
70
83
uses : ncipollo/release-action@v1
71
84
with :
72
85
token : ${{ secrets.WORKFLOW_PAT }}
73
86
prerelease : true
74
87
tag : ${{ steps.versions.outputs.release }}
88
+ body : ${{ steps.release-body.outputs.body }}
75
89
- name : Set development version
76
90
run : ' .github/bump-version.set.sh "${{ steps.versions.outputs.bumped }}"
77
91
You can’t perform that action at this time.
0 commit comments