File tree Expand file tree Collapse file tree 1 file changed +40
-15
lines changed Expand file tree Collapse file tree 1 file changed +40
-15
lines changed Original file line number Diff line number Diff line change 1- changelog :
2- exclude :
3- authors :
4- - octocat
5- categories :
6- - title : Breaking Changes 🛠
7- labels :
8- - breaking-change
9- - title : Bug Fixes 🐛
10- labels :
11- - bug-fix
12- - title : Exciting New Features 🎉
13- labels :
14- - enhancement
15- - feature
1+ # This action:
2+ #
3+ # 1. Generates release notes using github API.
4+ # 2. Strips unnecessary info like chore/style etc from notes.
5+ # 3. Updates release info.
6+
7+ name : ' Release Notes'
8+
9+ on :
10+ workflow_dispatch :
11+ inputs :
12+ tag_name :
13+ description : ' Tag of release like v1.0.0'
14+ required : true
15+ type : string
16+ release :
17+ types : [released]
18+
19+ permissions :
20+ contents : read
21+
22+ jobs :
23+ regen-notes :
24+ name : ' Regenerate release notes'
25+ runs-on : ubuntu-latest
26+
27+ steps :
28+ - name : Update notes
29+ run : |
30+ NEW_NOTES=$(gh api --method POST -H "Accept: application/vnd.github+json" /repos/frappe/crm/releases/generate-notes -f tag_name=$RELEASE_TAG \
31+ | jq -r '.body' \
32+ | sed -E '/^\* (chore|ci|test|docs|style)/d' \
33+ | sed -E 's/by @mergify //'
34+ )
35+ RELEASE_ID=$(gh api -H "Accept: application/vnd.github+json" /repos/frappe/crm/releases/tags/$RELEASE_TAG | jq -r '.id')
36+ gh api --method PATCH -H "Accept: application/vnd.github+json" /repos/frappe/crm/releases/$RELEASE_ID -f body="$NEW_NOTES"
37+
38+ env :
39+ GH_TOKEN : ${{ secrets.RELEASE_TOKEN }}
40+ RELEASE_TAG : ${{ github.event.inputs.tag_name || github.event.release.tag_name }}
You can’t perform that action at this time.
0 commit comments