@@ -67,17 +67,12 @@ jobs:
6767 fetch-depth : 0
6868 token : ${{ secrets.GH_ACCESS_TOKEN }}
6969
70- - name : Setup Python
71- uses : actions /setup-python@v5
70+ - name : Install uv and set Python version
71+ uses : astral-sh /setup-uv@v7
7272 with :
73+ version : " 0.11.2"
7374 python-version : " 3.12"
74-
75- - name : Install Poetry
76- uses : snok/install-poetry@v1
77- with :
78- version : " 1.8.4"
79- virtualenvs-create : true
80- virtualenvs-in-project : true
75+ enable-cache : true
8176
8277 - name : Configure Git
8378 env :
9287 - name : Get current version
9388 id : current-version
9489 run : |
95- current_version=$(poetry version -s )
90+ current_version=$(uv version --short )
9691 echo "version=$current_version" >> $GITHUB_OUTPUT
9792 echo "Current version: $current_version"
9893
@@ -211,27 +206,13 @@ jobs:
211206
212207 - name : Update version in pyproject.toml
213208 run : |
214- poetry version ${{ steps.new-version.outputs.version }}
215-
216- - name : Update version in langfuse/version.py
217- run : |
218- new_version="${{ steps.new-version.outputs.version }}"
219- sed -i "s/__version__ = \".*\"/__version__ = \"$new_version\"/" langfuse/version.py
220- echo "Updated langfuse/version.py:"
221- cat langfuse/version.py
209+ uv version ${{ steps.new-version.outputs.version }}
222210
223211 - name : Verify version consistency
224212 run : |
225- pyproject_version=$(poetry version -s)
226- file_version=$(grep -oP '__version__ = "\K[^"]+' langfuse/version.py)
213+ pyproject_version=$(uv version --short)
227214
228215 echo "pyproject.toml version: $pyproject_version"
229- echo "langfuse/version.py version: $file_version"
230-
231- if [ "$pyproject_version" != "$file_version" ]; then
232- echo "❌ Error: Version mismatch between pyproject.toml and langfuse/version.py"
233- exit 1
234- fi
235216
236217 if [ "$pyproject_version" != "${{ steps.new-version.outputs.version }}" ]; then
237218 echo "❌ Error: Version in files doesn't match expected version"
@@ -241,7 +222,7 @@ jobs:
241222 echo "✅ Versions are consistent: $pyproject_version"
242223
243224 - name : Build package
244- run : poetry build
225+ run : uv build --no-sources
245226
246227 - name : Verify build artifacts
247228 run : |
@@ -278,9 +259,17 @@ jobs:
278259 fi
279260 echo "✅ Artifact version verified"
280261
262+ - name : Smoke test wheel
263+ run : |
264+ uv run --isolated --no-project --with dist/*.whl python -c "from importlib.metadata import version; import langfuse; assert langfuse.__version__ == version('langfuse')"
265+
266+ - name : Smoke test source distribution
267+ run : |
268+ uv run --isolated --no-project --with dist/*.tar.gz python -c "from importlib.metadata import version; import langfuse; assert langfuse.__version__ == version('langfuse')"
269+
281270 - name : Commit version changes
282271 run : |
283- git add pyproject.toml langfuse/version.py
272+ git add pyproject.toml uv.lock
284273 git commit -m "chore: release v${{ steps.new-version.outputs.version }}"
285274
286275 - name : Create and push tag
@@ -292,9 +281,7 @@ jobs:
292281
293282 - name : Publish to PyPI
294283 id : publish-pypi
295- uses : pypa/gh-action-pypi-publish@release/v1
296- with :
297- print-hash : true
284+ run : uv publish --trusted-publishing always
298285
299286 - name : Create GitHub Release
300287 id : create-release
0 commit comments