Use official action to publish package in CI - #1169
Conversation
This enables trusted publishing (with attestations).
|
Failing tests seem unrelated (due to misusing NumPy single-value arrays as scalars) |
|
Solid migration overall — dropping username/password secrets for OIDC trusted publishing, keeping the One operational gap worth closing before this merges, because it will otherwise surface as a failed release upload: Trusted publishing is configured per project (and per workflow filename), not per environment. The PR description asks maintainers to configure publishers for two/three environments, but on PyPI each of the four packages needs its own pending-publisher entry pointing at this repo:
That's 8 entries on PyPI + 4 on TestPyPI. Additionally, the publisher record pins the workflow filename, and here the publish steps live in four different files ( Two suggestions:
|
Having the publish be a separate workflow (from building) makes auditing harder, complicating the chain of provenance. I suggest combining the workflows into one file. This is sensible as they all do effectively the same thing (build, test, pre-release, release rolling, release), only in different environments. I've done this in #1265 |
This enables trusted publishing (with attestations).
Tasks a maintainer needs to do:
test-opencv-python-release(for test-PyPI),opencv-python-rolling-release, andopencv-python-releaseOPENCV_PYTHON_ROLLING_PASSWORD,OPENCV_CONTRIB_PYTHON_ROLLING_PASSWORD,OPENCV_PYTHON_HEADLESS_ROLLING_PASSWORD,OPENCV_CONTRIB_PYTHON_HEADLESS_ROLLING_PASSWORD,PYPI_PASSWORD(test-PyPI),OPENCV_PYTHON_PASSWORD,OPENCV_CONTRIB_PYTHON_PASSWORD,OPENCV_PYTHON_HEADLESS_PASSWORD,OPENCV_CONTRIB_PYTHON_HEADLESS_PASSWORDtest-opencv-python-releaseopencv-pythonopencv-contrib-pythonopencv-python-headlessopencv-contrib-python-headlessbuild_wheels_macos.ymlbuild_wheels_macos_m1.ymlbuild_wheels_manylinux.ymlbuild_wheels_windows.ymlopencv-python-releaseopencv-pythonopencv-contrib-pythonopencv-python-headlessopencv-contrib-python-headlessbuild_wheels_macos.ymlbuild_wheels_macos_m1.ymlbuild_wheels_manylinux.ymlbuild_wheels_windows.ymlopencv-python-rolling-releaseopencv-python-rollingopencv-contrib-python-rollingopencv-python-headless-rollingopencv-contrib-python-headless-rollingbuild_wheels_macos.ymlbuild_wheels_macos_m1.ymlbuild_wheels_manylinux.ymlbuild_wheels_windows.ymlResolves #1110