From 000058c83b36b6c955b434b7b2d24dd8c8fe5172 Mon Sep 17 00:00:00 2001 From: Khoi Nguyen Date: Fri, 15 Sep 2023 15:51:15 +0800 Subject: [PATCH] Add new job to publish workflow to check version number precondition --- .github/workflows/publish_on_release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish_on_release.yml b/.github/workflows/publish_on_release.yml index ceb38c13..5eb4ae5d 100644 --- a/.github/workflows/publish_on_release.yml +++ b/.github/workflows/publish_on_release.yml @@ -12,6 +12,7 @@ jobs: version_nums: ${{ steps.parse.outputs.version_nums }} steps: - id: parse + shell: bash run: | tag_name="${{ github.ref_name }}" if ! [[ $tag_name =~ ^(([0-9]{1}|[1-9]{1}[0-9]{1}))\.(([0-9]{1}|[1-9]{1}[0-9]{1}))\.(([0-9]{1}|[1-9]{1}[0-9]{1}))$ ]]; then @@ -19,7 +20,7 @@ jobs: exit 1 fi parts=(${tag_name//./ }) - partsJson="[" + parts[0] + "," + parts[1] + "," + parts[2] + "]" + partsJson="[${parts[0]},${parts[1]},${parts[2]}]" echo "version_nums=${partsJson}" >> $GITHUB_OUTPUT # publish: