I generated the CI file using 1.86 maturin and tried to use the upload -r argument to set it to testpypi rather than pypi but it seems to ignore it in the action.
I could get it to work by using env instead.
MATURIN_REPOSITORY: testpypi
I'm not sure if this is an oversight or intended behaviour.