From 1377d830230a356167d34b80f0fce7468e51ad26 Mon Sep 17 00:00:00 2001 From: TrainDoctor Date: Mon, 5 Sep 2022 19:37:33 -0700 Subject: Better handling for release to new pre-release --- .github/workflows/build.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to '.github/workflows/build.yml') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e35f115e..d5c0e284 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 📤 -- cgit v1.2.3