Skip to content

Commit f316fb8

Browse files
committed
Publish packages built in PRs to testPyPI
1 parent d376197 commit f316fb8

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

.github/workflows/build_wheels.yml

+24-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build PYPI wheels for opencv-python
33
on:
44
push:
55
branches:
6-
- all
6+
- master
77
pull_request:
88
branches:
99
- master
@@ -272,6 +272,29 @@ jobs:
272272
name: wheels
273273
path: dist/opencv*.tar.gz
274274

275+
test_release_opencv_python_all:
276+
if: ${{github.event.pull_request.types}}
277+
needs: [build, build-windows-x86_64, build_sdist]
278+
runs-on: ubuntu-latest
279+
environment: test-opencv-python-release
280+
defaults:
281+
run:
282+
shell: bash
283+
steps:
284+
- uses: actions/download-artifact@v2
285+
with:
286+
name: wheels
287+
path: wheelhouse/
288+
289+
- name: Upload wheels ${{ matrix.os }}
290+
env:
291+
# PYPI repository credentials
292+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
293+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
294+
run: |
295+
python -m pip install twine
296+
python -m twine upload --repository testpypi -u ${Env:TWINE_USERNAME} -p ${Env:TWINE_PASSWORD} --skip-existing wheelhouse/opencv_*
297+
275298
276299
release_opencv_python:
277300
if: startsWith(github.ref, 'refs/tags/v')

0 commit comments

Comments
 (0)