diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 399a31e..8e6b31b 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -1,6 +1,12 @@ name: CMake -on: [push] +on: + pull_request: + branches: + - 'master' + push: + branches: + - 'master' env: BUILD_TYPE: Release @@ -66,7 +72,11 @@ jobs: run: ctest -C $BUILD_TYPE --verbose - name: Push binaries - if: contains(matrix.os, 'latest') && contains(matrix.python-version, '3.9') && github.event.pull_request.merged == true + if: | + contains(matrix.os, 'latest') && + contains(matrix.python-version, '3.9') && + ${{ github.event.name == 'push' }} && + ${{ github.ref == 'refs/heads/master' }} run: | git config --global user.name $GH_USERNAME git config --global user.email $GH_USERNAME@users.noreply.github.com