From 3b77b06439dcafd75b8a014be82c6c5d47196d87 Mon Sep 17 00:00:00 2001 From: Louis Date: Mon, 24 Jun 2024 13:46:49 +0700 Subject: [PATCH] fix: update cortex package.json version --- .github/workflows/cortex-build.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/cortex-build.yml b/.github/workflows/cortex-build.yml index 0b736c22e..f419b6d8a 100644 --- a/.github/workflows/cortex-build.yml +++ b/.github/workflows/cortex-build.yml @@ -181,6 +181,18 @@ jobs: uses: actions/checkout@v3 with: submodules: recursive + + - name: "Update version by tag" + 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" - uses: actions/setup-dotnet@v3 if: runner.os == 'Windows'