Better handling for release to new pre-release

This commit is contained in:
TrainDoctor
2022-09-05 19:37:33 -07:00
parent 43d36d2b35
commit 1377d83023

View File

@@ -147,8 +147,17 @@ jobs:
run: |
export VERSION=${{ steps.old_tag.outputs.tag }}
echo "VERS: $VERSION"
OUT=$(semver bump prerel "$VERSION")
echo "OUT: $OUT"
OUT=""
if [[ ! "$VERSION" =~ "-pre" ]]; then
printf "is release, bumping minor version and prerel\n"
OUT=$(semver bump minor "$VERSION")
OUT="$OUT-pre"
OUT=$(semver bump prerel "$OUT")
printf "OUT: ${OUT}\n"
elif [[ "$VERSION" =~ "-pre" ]]; then
printf "is a prerelease, bumping prerel\n"
OUT=$(semver bump prerel "$VERSION")
fi
echo ::set-output name=tag_name::v$OUT
- name: Push tag 📤