From 08bc21b4594ec8af618a49785f7cb892ea910284 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Tue, 26 May 2026 19:49:41 +0300 Subject: [PATCH] ci : move [no release] check to dedicated check_release job (#23734) * ci : move [no release] check to dedicated check_release job Move the workflow-level \`if\` condition that skips builds when the commit message contains \`[no release]\` into a lightweight \`check_release\` job. All build jobs now depend on it via \`needs\` and check its output. This ensures the skip logic is evaluated at the job level rather than at the workflow level, which is the recommended approach for conditional jobs. Assisted-by: llama.cpp:local pi * cont : use `fast` runner --- .github/workflows/release.yml | 51 ++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d815d13c..d5639fd64 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,11 +1,5 @@ name: Release -# Skip this workflow on push to master if the commit message contains [no release] -if: | - github.event_name != 'push' || - github.ref != 'refs/heads/master' || - !contains(github.event.head_commit.message, '[no release]') - on: workflow_dispatch: # allows manual triggering inputs: @@ -43,7 +37,30 @@ env: jobs: + check_release: + runs-on: [self-hosted, fast] + + outputs: + should_release: ${{ steps.check.outputs.should_release }} + + steps: + - id: check + run: | + if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then + echo "should_release=true" >> $GITHUB_OUTPUT + elif [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == "refs/heads/master" ]]; then + if echo "${{ github.event.head_commit.message }}" | grep -q '\[no release\]'; then + echo "should_release=false" >> $GITHUB_OUTPUT + else + echo "should_release=true" >> $GITHUB_OUTPUT + fi + else + echo "should_release=false" >> $GITHUB_OUTPUT + fi + macos-cpu: + needs: [check_release] + if: ${{ needs.check_release.outputs.should_release == 'true' }} strategy: matrix: include: @@ -114,6 +131,8 @@ jobs: name: llama-bin-macos-${{ matrix.build }}.tar.gz ubuntu-cpu: + needs: [check_release] + if: ${{ needs.check_release.outputs.should_release == 'true' }} strategy: matrix: include: @@ -190,6 +209,8 @@ jobs: name: llama-bin-ubuntu-${{ matrix.build }}.tar.gz ubuntu-vulkan: + needs: [check_release] + if: ${{ needs.check_release.outputs.should_release == 'true' }} strategy: matrix: @@ -266,6 +287,8 @@ jobs: name: llama-bin-ubuntu-vulkan-${{ matrix.build }}.tar.gz android-arm64: + needs: [check_release] + if: ${{ needs.check_release.outputs.should_release == 'true' }} runs-on: ubuntu-latest @@ -343,6 +366,8 @@ jobs: name: llama-bin-android-arm64.tar.gz ubuntu-24-openvino: + needs: [check_release] + if: ${{ needs.check_release.outputs.should_release == 'true' }} runs-on: ubuntu-24.04 @@ -431,6 +456,8 @@ jobs: name: llama-bin-ubuntu-openvino-${{ env.OPENVINO_VERSION_MAJOR }}-x64.tar.gz windows-cpu: + needs: [check_release] + if: ${{ needs.check_release.outputs.should_release == 'true' }} runs-on: windows-2025 @@ -491,6 +518,8 @@ jobs: name: llama-bin-win-cpu-${{ matrix.arch }}.zip windows: + needs: [check_release] + if: ${{ needs.check_release.outputs.should_release == 'true' }} runs-on: windows-2025 @@ -581,6 +610,8 @@ jobs: name: llama-bin-win-${{ matrix.backend }}-${{ matrix.arch }}.zip windows-cuda: + needs: [check_release] + if: ${{ needs.check_release.outputs.should_release == 'true' }} runs-on: windows-2022 @@ -869,6 +900,8 @@ jobs: # name: llama-bin-ubuntu-sycl-${{ matrix.build }}-x64.tar.gz ubuntu-22-rocm: + needs: [check_release] + if: ${{ needs.check_release.outputs.should_release == 'true' }} runs-on: ubuntu-22.04 @@ -980,6 +1013,8 @@ jobs: name: llama-bin-ubuntu-rocm-${{ env.ROCM_VERSION_SHORT }}-${{ matrix.build }}.tar.gz windows-hip: + needs: [check_release] + if: ${{ needs.check_release.outputs.should_release == 'true' }} runs-on: windows-2022 @@ -1094,6 +1129,8 @@ jobs: name: llama-bin-win-hip-${{ matrix.name }}-x64.zip ios-xcode-build: + needs: [check_release] + if: ${{ needs.check_release.outputs.should_release == 'true' }} runs-on: macos-15 steps: @@ -1242,6 +1279,8 @@ jobs: # name: llama-bin-${{ matrix.chip_type }}-openEuler-${{ matrix.arch }}${{ matrix.use_acl_graph == 'on' && '-aclgraph' || '' }}.tar.gz ui-build: + needs: [check_release] + if: ${{ needs.check_release.outputs.should_release == 'true' }} uses: ./.github/workflows/ui-build.yml release: