Skip to content

Commit 5b78107

Browse files
Update deploy-website.yml
1 parent fa93216 commit 5b78107

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/deploy-website.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,13 @@ jobs:
5454
run: |
5555
. .venv/bin/activate
5656
57-
echo "VERSION=$(python -c 'from importlib.metadata import version; print(".".join(version("autogen").split(".")[:3]))')" >> $GITHUB_ENV
58-
echo "IS_RC=$(python -c 'from importlib.metadata import version; print("rc" in version("autogen"))')" >> $GITHUB_ENV
57+
# Get version directly from the package using a more reliable method
58+
VERSION=$(python -c 'import os, sys; sys.path.insert(0, os.getcwd()); import autogen; print(".".join(autogen.__version__.split(".")[:3]))')
59+
echo "VERSION=$VERSION" >> $GITHUB_ENV
60+
61+
# Check if version contains "rc"
62+
IS_RC=$(python -c 'import os, sys; sys.path.insert(0, os.getcwd()); import autogen; print("rc" in autogen.__version__)')
63+
echo "IS_RC=$IS_RC" >> $GITHUB_ENV
5964

6065
echo $VERSION
6166
echo $IS_RC

0 commit comments

Comments
 (0)