Skip to content

Commit

Permalink
fix gha setup (#3049)
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysVuika authored Mar 7, 2023
1 parent 84a2860 commit 6233e71
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ runs:
shell: bash
run: |
TAG_NPM="alpha"
VERSION_IN_PACKAGE_JSON=$(node -p "require('./package.json')".version)
VERSION_IN_PACKAGE_JSON=$(jq -cr '.version' < package.json)
echo "version in package.json=${VERSION_IN_PACKAGE_JSON}"
if [[ ${{ inputs.branch_name }} =~ ^master(-patch.*)?$ ]]; then
if [[ $BRANCH_NAME =~ ^master(-patch.*)?$ ]]; then
# Pre-release versions
if [[ $VERSION_IN_PACKAGE_JSON =~ ^[0-9]*\.[0-9]*\.[0-9]*-A\.[0-9]*$ ]];
then
Expand All @@ -33,7 +35,8 @@ runs:
TAG_NPM=latest
fi
fi
if [[ ${{ inputs.branch_name }} =~ ^develop(-patch.*)?$ ]]; then
if [[ $BRANCH_NAME =~ ^develop(-patch.*)?$ ]]; then
TAG_NPM=alpha
fi
echo "TAG_NPM=${TAG_NPM}" >> $GITHUB_ENV

0 comments on commit 6233e71

Please sign in to comment.