Skip to content

Commit fd3bd4a

Browse files
authored
publish-release: Add -d argument to publish as draft release on GH (#135)
1 parent 38f2a5e commit fd3bd4a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

publish-release.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@ source ./config.sh
1313
godot_version=""
1414
latest_stable=0
1515
skip_stable=0
16+
draft_arg=""
1617

17-
while getopts "h?v:ls" opt; do
18+
while getopts "h?v:lsd" opt; do
1819
case "$opt" in
1920
h|\?)
2021
echo "Usage: $0 [OPTIONS...]"
2122
echo
2223
echo " -v godot version (e.g: 3.2-stable) [mandatory]"
2324
echo " -l latest stable release (web editor, itch.io, EGS)"
2425
echo " -s don't run stable specific steps"
26+
echo " -d publish as draft release on GitHub"
2527
echo
2628
exit 1
2729
;;
@@ -34,6 +36,9 @@ while getopts "h?v:ls" opt; do
3436
s)
3537
skip_stable=1
3638
;;
39+
d)
40+
draft_arg="-d"
41+
;;
3742
esac
3843
done
3944

@@ -100,7 +105,7 @@ if [ -z "${GODOT_BUILDS_PATH}" ]; then
100105
exit 1
101106
fi
102107

103-
${GODOT_BUILDS_PATH}/tools/upload-github.sh -v ${version} -f ${status}
108+
${GODOT_BUILDS_PATH}/tools/upload-github.sh -v ${version} -f ${status} ${draft_arg}
104109

105110
# Stable release only
106111

@@ -116,7 +121,7 @@ if [ "${status}" == "stable" -a "${skip_stable}" == "0" ]; then
116121
release_title=$(echo "$release_info" | jq -r '.name')
117122
release_desc=$(echo "$release_info" | jq -r '.body')
118123

119-
gh release create ${godot_version} --repo godotengine/godot --title "$release_title" --notes "$release_desc"
124+
gh release create ${godot_version} --repo godotengine/godot --title "$release_title" --notes "$release_desc" ${draft_arg}
120125
gh release upload ${godot_version} ${reldir}/[Gg]* ${reldir}/mono/[Gg]*
121126
# Concatenate SHA sums.
122127
cp ${reldir}/SHA512-SUMS.txt .

0 commit comments

Comments
 (0)