From 8886cd6ee6b8e91d56e8a85204abe10ff31b0556 Mon Sep 17 00:00:00 2001 From: Mateusz Kwasniewski Date: Mon, 27 Feb 2023 11:19:31 +0100 Subject: [PATCH] fix: gh action shell (#3200) --- .github/update_own_version.sh | 13 +++++++++++-- .../workflows/continuous-publish-new-version.yaml | 3 ++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/update_own_version.sh b/.github/update_own_version.sh index 8a5ccf166a..3fb04d89b2 100755 --- a/.github/update_own_version.sh +++ b/.github/update_own_version.sh @@ -1,5 +1,14 @@ -#!/usr/bin/env bash +#!/bin/bash set -e -npm version prerelease --preid=beta --ignore-scripts +CURRENT_VERSION=$(npm pkg get version) +echo $CURRENT_VERSION + +if [[ $CURRENT_VERSION == *beta* ]]; then + echo "Current beta update" + npm version prerelease --preid=beta --ignore-scripts +else + echo "Next minor beta update" + npm version preminor --preid=beta --ignore-scripts +fi diff --git a/.github/workflows/continuous-publish-new-version.yaml b/.github/workflows/continuous-publish-new-version.yaml index 3477f61197..2f8e3ba25d 100644 --- a/.github/workflows/continuous-publish-new-version.yaml +++ b/.github/workflows/continuous-publish-new-version.yaml @@ -39,7 +39,8 @@ jobs: # sample transition after official release: 4.20.0 -> 4.21.0-beta.0 # sample transition after previous beta release: 4.21.0-beta.0 -> 4.21.0-beta.1 - name: update own version - run: .github/update_own_version.sh + shell: bash + run: bash ./.github/update_own_version.sh - name: push new version # The new version is pushed back to main and to npm run: |