Fix pre-release, none

This commit is contained in:
TrainDoctor
2022-09-04 20:36:03 -07:00
parent 7c99af9a9a
commit 97f95705f8
+7 -3
View File
@@ -210,14 +210,18 @@ jobs:
if [[ "${{github.event.inputs.bump}}" != "none" ]]; then if [[ "${{github.event.inputs.bump}}" != "none" ]]; then
OUT=$(semver bump release "$VERSION") OUT=$(semver bump release "$VERSION")
printf "OUT: ${OUT}\n" printf "OUT: ${OUT}\n"
OUT=$(semver bump ${{github.event.inputs.bump}} "$VERSION") OUT=$(semver bump ${{github.event.inputs.bump}} "$OUT")
printf "OUT: ${OUT}\n" printf "OUT: ${OUT}\n"
fi fi
if [[ ! "$OUT" =~ "-pre" ]]; then if [[ ! "$OUT" =~ "-pre" ]]; then
OUT="$OUT-pre" OUT="${OUT}-pre"
printf "OUT: ${OUT}\n" printf "OUT: ${OUT}\n"
fi fi
OUT=$(semver bump prerel "$OUT") if [[ "$OUT" == "" ]]; then
OUT=$(semver bump prerel "$VERSION")
else
OUT=$(semver bump prerel "$OUT")
fi
echo "OUT: v$OUT" echo "OUT: v$OUT"
echo ::set-output name=tag_name::v$OUT echo ::set-output name=tag_name::v$OUT