From 26ee3dfb44652231c26194aba5de1a4c9024561c Mon Sep 17 00:00:00 2001 From: edraft Date: Sat, 14 Feb 2026 15:10:18 +0100 Subject: [PATCH] Updated version handling --- set-version/action.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/set-version/action.yaml b/set-version/action.yaml index 47f1d84..da137dc 100644 --- a/set-version/action.yaml +++ b/set-version/action.yaml @@ -6,6 +6,10 @@ inputs: description: "Suffix for version (e.g. dev, alpha, beta)" required: false default: "" + suffix_separator: + description: "Separator between version and suffix (either '.' or '-')" + required: false + default: "-" runs: using: "composite" @@ -33,11 +37,10 @@ runs: fi VERSION_SUFFIX="${{ inputs.version_suffix }}" + SUFFIX_SEPARATOR="${{ inputs.suffix_separator }}" - if [ -n "$VERSION_SUFFIX" ] && [ "$VERSION_SUFFIX" = "dev" ]; then - BUILD_VERSION="${DATE}.dev${BUILD_NUMBER}" - elif [ -n "$VERSION_SUFFIX" ]; then - BUILD_VERSION="${DATE}.${BUILD_NUMBER}${VERSION_SUFFIX}" + if [ -n "$VERSION_SUFFIX" ]; then + BUILD_VERSION="${DATE}.${BUILD_NUMBER}${SUFFIX_SEPARATOR}${VERSION_SUFFIX}" else BUILD_VERSION="${DATE}.${BUILD_NUMBER}" fi