From 8ba02cc1ee73497414fa901ceba3c448c504c8ee Mon Sep 17 00:00:00 2001 From: Louis Date: Mon, 24 Jun 2024 14:20:39 +0700 Subject: [PATCH] fix: cortex version on windows --- .github/workflows/cortex-build.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cortex-build.yml b/.github/workflows/cortex-build.yml index f419b6d8a..e7e6772d6 100644 --- a/.github/workflows/cortex-build.yml +++ b/.github/workflows/cortex-build.yml @@ -182,17 +182,16 @@ jobs: with: submodules: recursive + - name: Install jq + uses: dcarbone/install-jq-action@v2.0.1 + - name: "Update version by tag" + shell: bash run: | - cd cortex-js - # Remove the v prefix - tag_version=${GITHUB_REF#refs/tags/v} - - # Replace the old version with the new version in package.json - jq --arg version "$tag_version" '.version = $version' ./package.json > /tmp/package.json && mv /tmp/package.json ./package.json - - # Print the new version - echo "Updated package.json version to: $tag_version" + echo "Version: ${{ inputs.new_version }}" + # Update the version in package.json + jq --arg version "${{ inputs.new_version }}" '.version = $version' package.json > /tmp/package.json + mv /tmp/package.json package.json - uses: actions/setup-dotnet@v3 if: runner.os == 'Windows'