name: update-maturin
description: Bump maturin to the latest release and regenerate .github/workflows/tapo-py.yml, preserving local customizations
Update Maturin
Bump the maturin build tool to the latest version and regenerate .github/workflows/tapo-py.yml from maturin generate-ci github, re-applying all local customizations.
Steps
Bump the maturin dependency. From
tapo-py/:uv lock --upgrade-package maturin uv sync uv run maturin --versionConfirm the new version in the last command's output. If it didn't change, maturin is already at the latest — stop and tell the user.
Regenerate the workflow baseline. From
tapo-py/, runuv run maturin generate-ci githuband capture the stdout (skip the📦/🍹/🔗progress lines). This is the baseline — do NOT overwrite.github/workflows/tapo-py.ymlwith it directly.Apply the baseline to
.github/workflows/tapo-py.yml, re-applying each customization below. After editing, diff the updated file against the baseline — the only remaining differences should be exactly the items listed here. Anything in the committed file that is not on this list should be replaced with the baseline value, even if the committed file differs; treat those as stale upstream defaults, not deliberate customizations.Workflow name:
name: "Tapo Python"(baseline:name: CI).Triggers under
on::push.branches: onlymain(baseline includesmaster).push.tags:"v*"(baseline:'*').pull_request.paths: keep the existing list (tapo/**,tapo-py/**,Cargo.lock,Cargo.toml,.github/workflows/tapo-py.yml). Baseline has no path filter.
--manifest-path ./tapo-py/Cargo.toml: append this flag to everyargs:line in eachPyO3/maturin-action@v1step (linux, musllinux, windows, macos, and sdist jobs).manylinux: 2_28: in thelinuxjob (baseline:auto).GitHub Actions versions: never downgrade. For each
uses: <action>@vNline, keep the higher of the two versions between the current file and the baseline (e.g. if the file pinsactions/upload-artifact@v7but the baseline emits@v6, keep@v7). To make this mechanical, compare withdiff <(grep 'uses: actions/' .github/workflows/tapo-py.yml) <(grep 'uses: actions/' <baseline-file>)and reconcile each differing line by picking the higher@vN.Job display names: each job has a
name:using thePython / ...prefix convention. The baseline emits noname:on the matrix jobs andname: Releaseon the release job — re-add these after regeneration:linux:name: Python / Linux wheel (${{ matrix.platform.target }})musllinux:name: Python / Musllinux wheel (${{ matrix.platform.target }})windows:name: Python / Windows wheel (${{ matrix.platform.target }})macos:name: Python / macOS wheel (${{ matrix.platform.target }})sdist:name: Python / Sdistrelease:name: Python / Publish to PyPI(baseline:Release)
Test sdiststep: keep this step betweenBuild sdistandUpload sdistin thesdistjob:- name: Test sdist run: | pip install --force-reinstall --verbose dist/*.tar.gz python -c 'from tapo import ApiClient'
Verify. Run
git diff .github/workflows/tapo-py.yml. Every line change should be either (a) thematurin v<old>→v<new>version bump in the header comment, (b) an upstream structural change introduced by the new maturin release, or (c) one of the preserved customizations above. Flag anything else before handing back.