From 242cfa72d44995689d2321e19f1f8050afdafc4e Mon Sep 17 00:00:00 2001 From: "Jibon L. Costa" Date: Sat, 21 Dec 2024 22:19:22 +0100 Subject: [PATCH] fix(ci): use `npm version` --- .github/workflows/release-please.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 8f06496..3cdeb9b 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -40,11 +40,10 @@ jobs: if [ ! ${{ steps.release.outputs.release_created }} ]; then # we'll update version for beta release git_hash=$(git rev-parse --short "$GITHUB_SHA") - CURRENT_VERSION=$(node -p "require('./package.json').version") - NEXT_VERSION=$(echo ${CURRENT_VERSION} | awk -F. -v OFS=. '{$NF += 1 ; print}') + NEXT_VERSION=$(echo $(node -p "require('./package.json').version") | awk -F. -v OFS=. '{$NF += 1 ; print}') BETA_VERSION="${NEXT_VERSION}-${git_hash}" echo "New beta version for NPM: ${BETA_VERSION}" - sed -i "s/${CURRENT_VERSION}/${BETA_VERSION}/" package.json + npm version ${BETA_VERSION} fi bash generate.sh