Skip to content

Commit 3171a69

Browse files
dbrattliclaude
andauthored
chore: replace deprecated maturin upload with uv publish (#4669)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 08aa214 commit 3171a69

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

.github/workflows/publish-pypi.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ jobs:
3030
python-version: '3.12'
3131
- name: Install Rust
3232
uses: dtolnay/rust-toolchain@stable
33-
- name: Install Uv and Maturin
34-
run: |
35-
pipx install uv
36-
pipx install maturin
33+
- name: Install uv
34+
uses: astral-sh/setup-uv@v8
35+
- name: Install Maturin
36+
run: uv tool install maturin
3737
- name: Transpile F# to Python
3838
run: ./build.sh fable-library --python
3939
- name: Install Dunamai
40-
run: pipx install dunamai
40+
run: uv tool install dunamai
4141
- name: Set version
4242
run: |
4343
VERSION=$(dunamai from git --format "{base}{stage}{revision}" --pattern "^(?P<base>\d+\.\d+\.\d+)((-(?P<stage>alpha|beta|rc))\.(?P<revision>\d+))?$" --latest-tag)
@@ -74,8 +74,8 @@ jobs:
7474
python-version: ${{ matrix.python-version }}
7575
- name: Install Rust
7676
uses: dtolnay/rust-toolchain@stable
77-
- name: Install Uv
78-
run: pipx install uv
77+
- name: Install uv
78+
uses: astral-sh/setup-uv@v8
7979
- name: Download fable-library-py
8080
uses: actions/download-artifact@v8
8181
with:
@@ -281,11 +281,12 @@ jobs:
281281
uses: actions/attest-build-provenance@v4
282282
with:
283283
subject-path: 'wheels-*/*'
284+
- name: Install uv
285+
uses: astral-sh/setup-uv@v8
284286
- name: Publish to PyPI
285287
if: ${{ github.event_name == 'release' || github.event_name == 'workflow_dispatch' }}
286-
uses: PyO3/maturin-action@v1
288+
# `maturin upload` is deprecated (PyO3/maturin#2334); use `uv publish`.
289+
# `--check-url` skips files already on PyPI (replaces `--skip-existing`).
287290
env:
288-
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
289-
with:
290-
command: upload
291-
args: --non-interactive --skip-existing wheels-*/*
291+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
292+
run: uv publish --check-url https://pypi.org/simple/ wheels-*/*

0 commit comments

Comments
 (0)