From 21052df03a9449600079bb1875b7e816d6d1322e Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Thu, 16 May 2024 07:29:43 +0000 Subject: [PATCH] added version from wheel --- .github/workflows/pypi.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index dd49ce9..73e23be 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -28,10 +28,13 @@ jobs: plugins: "poetry-dynamic-versioning" repository_name: "scraibe" repository_url: "https://test.pypi.org/legacy/" - - name: Get the version + - name: Get the version from wheel run: | - echo "SCRAIBE_VERSION=$(python -c 'import scraibe; print(scraibe.__version__)')" >> $GITHUB_ENV - echo "SCRAIBE_VERSION=$SCRAIBE_VERSION" + WHEEL_FILE=$(find dist -name "*.whl" | head -n 1) + VERSION=$(python -c "from pkginfo import Wheel; w = Wheel('$WHEEL_FILE'); print(w.version)") + echo "SCRAIBE_VERSION=$VERSION" >> $GITHUB_ENV + echo "SCRAIBE_VERSION=$VERSION" + - name: 'Upload Artifact' uses: actions/upload-artifact@v4 with: