File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ name : release-notes
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch : {}
8+
9+ jobs :
10+ release-notes :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+ - name : Draft release notes
15+ run : |
16+ set -o errexit
17+ set -o nounset
18+ set -o pipefail
19+ set -x
20+
21+ latest_tag="$(gh release view --json tagName --jq .tagName)"
22+
23+ major="$(echo "$latest_tag" | cut -d. -f1)"
24+ minor="$(echo "$latest_tag" | cut -d. -f2)"
25+ new_tag="$major.$((minor+1)).0"
26+
27+ if [ "$(gh release view "$new_tag" --json isDraft --jq .isDraft)" = true ] ; then
28+ # clean up previous draft release
29+ gh release delete -y "$new_tag"
30+ fi
31+
32+ gh release create "$new_tag" --draft --generate-notes --notes-start-tag="${latest_tag%.*}.0"
33+ env :
34+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments