From d69c20f820e4560b7aac2a101da17ed95bee3197 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Thu, 4 Jan 2024 15:11:56 +0530 Subject: [PATCH] (ci/cd) use pyproject version for github release --- .github/workflows/ghcr_deploy.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ghcr_deploy.yml b/.github/workflows/ghcr_deploy.yml index 323096ead..80f8a0247 100644 --- a/.github/workflows/ghcr_deploy.yml +++ b/.github/workflows/ghcr_deploy.yml @@ -30,9 +30,12 @@ jobs: - name: Read version from pyproject.toml id: read-version - run: echo "VERSION=\$(python -c 'import toml; print(toml.load(\"pyproject.toml\")[\"tool\"][\"commitizen\"][\"version\"])') >> \$GITHUB_ENV" + run: | + version=$(python -c 'import toml; print(toml.load("pyproject.toml")["tool"]["commitizen"]["version"])') + printf "LITELLM_VERSION=%s" "$version" >> $GITHUB_ENV + - name: Display version - run: echo "Current LiteLLM version in pyproject.toml is $VERSION" + run: echo "Current version is $LITELLM_VERSION" build-and-push-image: runs-on: ubuntu-latest # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. @@ -104,7 +107,7 @@ jobs: steps: - name: "Set Release Tag" - run: echo "RELEASE_TAG=$VERSION" >> $GITHUB_ENV + run: echo "RELEASE_TAG=$LITELLM_VERSION"" >> $GITHUB_ENV - name: "Create release" uses: "actions/github-script@v6" with: