Browse Source

Skip packaging steps for PR.

Yao Wei Tjong 姚伟忠 5 years ago
parent
commit
afb2edab1e
1 changed files with 9 additions and 2 deletions
  1. 9 2
      .github/workflows/main.yml

+ 9 - 2
.github/workflows/main.yml

@@ -100,10 +100,10 @@ jobs:
         if: startsWith(matrix.platform, 'linux') || matrix.platform == 'android'
         if: startsWith(matrix.platform, 'linux') || matrix.platform == 'android'
       - name: Documentation
       - name: Documentation
         run: script/dockerized.sh ${PLATFORM/-*} rake ci doc
         run: script/dockerized.sh ${PLATFORM/-*} rake ci doc
-        if: matrix.platform != 'linux-clang-tidy' && matrix.platform != 'linux-clang-format'
+        if: github.event_name == 'push' && matrix.platform != 'linux-clang-tidy' && matrix.platform != 'linux-clang-format'
       - name: Package
       - name: Package
         run: script/dockerized.sh ${PLATFORM/-*} rake ci package
         run: script/dockerized.sh ${PLATFORM/-*} rake ci package
-        if: matrix.platform != 'linux-clang-tidy' && matrix.platform != 'linux-clang-format'
+        if: github.event_name == 'push' && matrix.platform != 'linux-clang-tidy' && matrix.platform != 'linux-clang-format'
       - name: Upload artifact
       - name: Upload artifact
         uses: actions/upload-artifact@v2
         uses: actions/upload-artifact@v2
         with:
         with:
@@ -112,6 +112,7 @@ jobs:
             build/ci/*.tar.gz
             build/ci/*.tar.gz
             android/urho3d-lib/build/distributions/*.aar
             android/urho3d-lib/build/distributions/*.aar
             build/*.out
             build/*.out
+        if: github.event_name == 'push' || matrix.platform == 'linux-clang-tidy' == matrix.platform != 'linux-clang-format'
   macOS:
   macOS:
     name: 🍏
     name: 🍏
     runs-on: macos-latest
     runs-on: macos-latest
@@ -150,13 +151,16 @@ jobs:
         if: startsWith(matrix.platform, 'macOS')
         if: startsWith(matrix.platform, 'macOS')
       - name: Documentation
       - name: Documentation
         run: rake ci doc
         run: rake ci doc
+        if: github.event_name == 'push'
       - name: Package
       - name: Package
         run: rake ci package
         run: rake ci package
+        if: github.event_name == 'push'
       - name: Upload artifact
       - name: Upload artifact
         uses: actions/upload-artifact@v2
         uses: actions/upload-artifact@v2
         with:
         with:
           name: ${{ matrix.platform }}-${{ matrix.lib-type }}-all-rel
           name: ${{ matrix.platform }}-${{ matrix.lib-type }}-all-rel
           path: build/ci/*.tar.gz
           path: build/ci/*.tar.gz
+        if: github.event_name == 'push'
   windows:
   windows:
     name: 🔲
     name: 🔲
     runs-on: windows-latest
     runs-on: windows-latest
@@ -194,13 +198,16 @@ jobs:
         if: matrix.graphics-api != 'OpenGL'
         if: matrix.graphics-api != 'OpenGL'
       - name: Documentation
       - name: Documentation
         run: rake ci doc
         run: rake ci doc
+        if: github.event_name == 'push'
       - name: Package
       - name: Package
         run: rake ci package
         run: rake ci package
+        if: github.event_name == 'push'
       - name: Upload artifact
       - name: Upload artifact
         uses: actions/upload-artifact@v2
         uses: actions/upload-artifact@v2
         with:
         with:
           name: ${{ matrix.platform }}-${{ matrix.lib-type }}-64-${{ matrix.graphics-api }}-rel
           name: ${{ matrix.platform }}-${{ matrix.lib-type }}-64-${{ matrix.graphics-api }}-rel
           path: build/ci/*.zip
           path: build/ci/*.zip
+        if: github.event_name == 'push'
 
 
 ...
 ...