This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch fix/build-version
in repository https://gitbox.apache.org/repos/asf/struts-intellij-plugin.git

commit 4c4562b8e916dfa04f4fb7878ce4e77b0f6da066
Author: Lukasz Lenart <lukaszlen...@apache.org>
AuthorDate: Fri Aug 15 19:37:12 2025 +0200

    Uploads artifact only when building on main branch
---
 .github/workflows/build.yml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 877fe0b..c858586 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -75,15 +75,15 @@ jobs:
         id: properties
         shell: bash
         run: |
-          
           echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT
 
       # Build plugin
       - name: Build plugin
         run: ./gradlew buildPlugin
 
-      # Prepare plugin archive content for creating artifact
+      # Prepare plugin archive content for creating artifact (main branch only)
       - name: Prepare Plugin Artifact
+        if: github.event_name == 'push' && github.ref == 'refs/heads/main'
         id: artifact
         shell: bash
         run: |
@@ -93,8 +93,9 @@ jobs:
 
           echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT
 
-      # Store already-built plugin as an artifact for downloading
+      # Store already-built plugin as an artifact for downloading (main branch 
only)
       - name: Upload artifact
+        if: github.event_name == 'push' && github.ref == 'refs/heads/main'
         uses: actions/upload-artifact@v4
         with:
           name: ${{ steps.artifact.outputs.filename }}

Reply via email to