added version from wheel

This commit is contained in:
Schmieder, Jacob
2024-05-16 07:29:43 +00:00
parent 5918458d47
commit 21052df03a
+6 -3
View File
@@ -28,10 +28,13 @@ jobs:
plugins: "poetry-dynamic-versioning" plugins: "poetry-dynamic-versioning"
repository_name: "scraibe" repository_name: "scraibe"
repository_url: "https://test.pypi.org/legacy/" repository_url: "https://test.pypi.org/legacy/"
- name: Get the version - name: Get the version from wheel
run: | run: |
echo "SCRAIBE_VERSION=$(python -c 'import scraibe; print(scraibe.__version__)')" >> $GITHUB_ENV WHEEL_FILE=$(find dist -name "*.whl" | head -n 1)
echo "SCRAIBE_VERSION=$SCRAIBE_VERSION" 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' - name: 'Upload Artifact'
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with: