Skip to content

Fixed if condition for release job #478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 6, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added the test release job, changed if condition
  • Loading branch information
asenyaev authored May 6, 2021
commit df78ec70029c83ce19bb5cb334f1ad4015e21e5f
38 changes: 36 additions & 2 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,42 @@ 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 wheels for opencv_python
run: |
python -m pip install twine
python -m twine upload --repository testpypi -u ${{ secrets.OPENCV_PYTHON_USERNAME }} -p ${{ secrets.OPENCV_PYTHON_PASSWORD }} --skip-existing wheelhouse/opencv_python-*

- name: Upload wheels for opencv_contrib_python
run: |
python -m pip install twine
python -m twine upload --repository testpypi -u ${{ secrets.OPENCV_CONTRIB_PYTHON_USERNAME }} -p ${{ secrets.OPENCV_CONTRIB_PYTHON_PASSWORD }} --skip-existing wheelhouse/opencv_contrib_python-*

- name: Upload wheels for opencv_python_headless
run: |
python -m pip install twine
python -m twine upload --repository testpypi -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 --repository testpypi -u ${{ secrets.OPENCV_CONTRIB_PYTHON_HEADLESS_USERNAME }} -p ${{ secrets.OPENCV_CONTRIB_PYTHON_HEADLESS_PASSWORD }} --skip-existing wheelhouse/opencv_contrib_python_headless-*

release_opencv_python:
if: github.event_name == 'release' && github.event.action == 'published'
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
Expand All @@ -257,6 +291,7 @@ jobs:
with:
name: wheels
path: wheelhouse/

- name: Upload wheels for opencv_python
run: |
python -m pip install twine
Expand All @@ -273,7 +308,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-*