未验证 提交 88c1735d 编写于 作者: A Andrey Senyaev 提交者: GitHub

Fixed if condition for release job (#478)

* Fixed if condition for release job

* Added the test release job, changed if condition

* Merged all upload steps into one for pre-release
上级 aa269909
......@@ -244,8 +244,27 @@ jobs:
name: wheels
path: dist/opencv*.tar.gz
test_release_opencv_python:
if: github.event_name == 'release' && github.event.release.prerelease
needs: [build, build-windows-x86_64, build_sdist]
runs-on: ubuntu-latest
environment: test-opencv-python-release
defaults:
run:
shell: bash
steps:
- uses: actions/download-artifact@v2
with:
name: wheels
path: wheelhouse/
- name: Upload all wheels
run: |
python -m pip install twine
python -m twine upload --repository testpypi -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} --skip-existing wheelhouse/opencv_*
release_opencv_python:
if: startsWith(github.ref, 'refs/tags/v')
if: github.event_name == 'release' && !github.event.release.prerelease
needs: [build, build-windows-x86_64, build_sdist]
runs-on: ubuntu-latest
environment: opencv-python-release
......@@ -257,6 +276,7 @@ jobs:
with:
name: wheels
path: wheelhouse/
- name: Upload wheels for opencv_python
run: |
python -m pip install twine
......@@ -273,7 +293,6 @@ jobs:
python -m twine upload -u ${{ secrets.OPENCV_PYTHON_HEADLESS_USERNAME }} -p ${{ secrets.OPENCV_PYTHON_HEADLESS_PASSWORD }} --skip-existing wheelhouse/opencv_python_headless-*
- name: Upload wheels for opencv_contrib_python_headless
run: |
python -m pip install twine
python -m twine upload -u ${{ secrets.OPENCV_CONTRIB_PYTHON_HEADLESS_USERNAME }} -p ${{ secrets.OPENCV_CONTRIB_PYTHON_HEADLESS_PASSWORD }} --skip-existing wheelhouse/opencv_contrib_python_headless-*
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册