A pyproject.toml that creates this issue is as follows:
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
[project]
name= "My-Test-Project"
version = "0.1.0"
[tool.uv]
trusted-publishing = "always"
[[tool.uv.index]]
explicit = true
name = "testpypi"
publish-url = "https://test.pypi.org/legacy"
url = "https://test.pypi.org/simple"
Running uv publish --index testpypi results in the following message:
warning: `uv publish` is experimental and may change without warning
error: No indexes were found, can't use index: `testpypi`