File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ git add .
43
43
git commit -m " build v$MAJOR .$MINOR .$PATCH " || true
44
44
git push origin " releases/v$MAJOR "
45
45
gh release create " v$MAJOR .$MINOR .$PATCH " \
46
- --draft --target " $( git rev-parse HEAD) " --title " v$MAJOR .$MINOR .$PATCH " --notes " "
46
+ --draft --target " $( git rev-parse HEAD) " --title " v$MAJOR .$MINOR .$PATCH " --generate- notes
47
47
48
48
cd " $CURRENT "
49
49
rm -rf " $WORKING "
Original file line number Diff line number Diff line change @@ -23,8 +23,10 @@ MINOR=$(echo "$VERSION" | cut -d. -f2)
23
23
PATCH=$( echo " $VERSION " | cut -d. -f3)
24
24
WORKING=$CURRENT /.working
25
25
26
- : release the action
27
- if ! RELEASE=$( gh release view " v$MAJOR .$MINOR .$PATCH " --json url,targetCommitish) ; then
26
+ cd " $CURRENT "
27
+
28
+ : check whether the release is already created.
29
+ if ! RELEASE=$( gh release view " v$MAJOR .$MINOR .$PATCH " --json url,targetCommitish,apiUrl) ; then
28
30
: it looks that " v$MAJOR .$MINOR .$PATCH " is not tagged.
29
31
: run ./prepare.sh " v$MAJOR .$MINOR .$PATCH " at first.
30
32
: see the comments of ./release.sh for more details.
@@ -37,6 +39,10 @@ rm -rf "$WORKING"
37
39
git clone " $ORIGIN " " $WORKING "
38
40
cd " $WORKING "
39
41
42
+ : make a draft release public.
43
+ echo ' {"draft":false}' | gh api -X PATCH --input - " $( echo " $RELEASE " | jq ' .apiUrl' ) " --jq ' .html_url'
44
+
45
+ : make a tag.
40
46
git checkout " $( echo " $RELEASE " | jq -r .targetCommitish) "
41
47
git tag -sfa " v$MAJOR " -m " release v$MAJOR .$MINOR .$PATCH "
42
48
git push -f origin " v$MAJOR "
You can’t perform that action at this time.
0 commit comments