diff --git a/.github/workflows/build-plugin-zip.yml b/.github/workflows/build-plugin-zip.yml index 17b54087c917f4..780229dfbf990f 100644 --- a/.github/workflows/build-plugin-zip.yml +++ b/.github/workflows/build-plugin-zip.yml @@ -21,6 +21,7 @@ jobs: compute-stable-branches: name: Compute current and next stable release branches runs-on: ubuntu-latest + if: ${{ github.event_name == 'workflow_dispatch' }} outputs: current_stable_branch: ${{ steps.get_branches.outputs.current_stable_branch }} next_stable_branch: ${{ steps.get_branches.outputs.next_stable_branch }} @@ -46,7 +47,6 @@ jobs: runs-on: ubuntu-latest needs: compute-stable-branches if: | - github.repository == 'WordPress/gutenberg' && github.event_name == 'workflow_dispatch' && ( ( github.ref == 'refs/heads/trunk' || @@ -146,7 +146,12 @@ jobs: name: Build Release Artifact runs-on: ubuntu-latest needs: bump-version - if: ${{ ( github.repository == 'WordPress/gutenberg' && always() ) || ( github.event_name == 'pull_request' && always() ) }} + if: | + always() && ( + github.event_name == 'pull_request' || + github.event_name == 'workflow_dispatch' || + github.repository == 'WordPress/gutenberg' + ) steps: - name: Checkout code @@ -204,7 +209,6 @@ jobs: name: Create Release Draft and Attach Asset needs: [bump-version, build] runs-on: ubuntu-latest - if: ${{ github.repository == 'WordPress/gutenberg' }} steps: - name: Set Release Version