Skip to content

Commit bde2b9e

Browse files
use uv directly in CI
1 parent 4d24b82 commit bde2b9e

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/publish.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- uses: actions/checkout@v6
23-
- uses: jdx/mise-action@v4
23+
- uses: astral-sh/setup-uv@v8.2.0
2424

2525
- name: Validate release is stable
2626
env:
@@ -33,7 +33,7 @@ jobs:
3333
fi
3434
VERSION="${TAG#v}"
3535
if echo "$VERSION" | grep -Eq '(^|[.-])[ab]([0-9]|$)|(^|[.-])rc[0-9]'; then
36-
echo "Pre-release versions (a/b/rc) are not published to PyPI: $VERSION"
36+
echo "Pre-release versions are not published to PyPI: $VERSION"
3737
exit 1
3838
fi
3939
PYPROJECT_VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
@@ -42,7 +42,9 @@ jobs:
4242
exit 1
4343
fi
4444
45-
- name: Publish to PyPI
46-
env:
47-
UV_PUBLISH_TRUSTED_PUBLISHING: "always"
48-
run: mise run publish pypi
45+
- name: Build and Publish to PyPI
46+
run: |
47+
uv build --wheel --clear
48+
VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
49+
WHEEL=$(find dist -maxdepth 1 -name "*-${VERSION}-*.whl" -print | head -n 1)
50+
uv publish --trusted-publishing always "$WHEEL"

0 commit comments

Comments
 (0)