Spaces:
Running
Running
fix indentation
Browse files
.github/workflows/release.yaml
CHANGED
@@ -92,12 +92,12 @@ jobs:
|
|
92 |
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
93 |
|
94 |
# Step 5: Get latest version from PyPI
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
|
102 |
# Step 6: Compare current version with the latest tag
|
103 |
- name: Check if version is bumped
|
|
|
92 |
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
93 |
|
94 |
# Step 5: Get latest version from PyPI
|
95 |
+
- name: Get latest version from PyPI
|
96 |
+
id: get_pypi_version
|
97 |
+
run: |
|
98 |
+
PACKAGE_NAME=$(python -c "import toml; print(toml.load('pyproject.toml')['project']['name'])")
|
99 |
+
LATEST_PYPI_VERSION=$(python -c "import requests; response = requests.get(f'https://pypi.org/pypi/{PACKAGE_NAME}/json'); print(response.json()['info']['version'])")
|
100 |
+
echo "LATEST_PYPI_VERSION=$LATEST_PYPI_VERSION" >> $GITHUB_ENV
|
101 |
|
102 |
# Step 6: Compare current version with the latest tag
|
103 |
- name: Check if version is bumped
|