From fa43189a2d6b2ea79c2b09b3480c721bb7439351 Mon Sep 17 00:00:00 2001 From: Lily Delalande Date: Wed, 29 Jan 2025 14:58:31 -0500 Subject: [PATCH] process to update version --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d91bf096f5..cf35068b22 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,9 +14,37 @@ concurrency: jobs: # ------------------------------------ + # 1) Update the version + # ------------------------------------ + update-version: + name: Update Cargo.toml & package.json Version + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Extract version from GitHub release tag + run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV + + - name: Update workspace Cargo.toml version + run: sed -i 's/^version = ".*"/version = "'"$VERSION"'"/' Cargo.toml + + - name: Update package.json version + run: | + npm version $VERSION --no-git-tag-version --allow-same-version + working-directory: ui/desktop + + - name: Commit updated files + run: | + git config --global user.name "github-actions" + git config --global user.email "github-actions@github.com" + git commit -am "Update versions to $VERSION" + git push + # ------------------------------------ # 1) Build CLI for multiple OS/Arch # ------------------------------------ build-cli: + needs: [ update-version ] uses: ./.github/workflows/build-cli.yml # ------------------------------------