|
1 | 1 | name: Release |
2 | 2 |
|
3 | | -# Skip this workflow on push to master if the commit message contains [no release] |
4 | | -if: | |
5 | | - github.event_name != 'push' || |
6 | | - github.ref != 'refs/heads/master' || |
7 | | - !contains(github.event.head_commit.message, '[no release]') |
8 | | -
|
9 | 3 | on: |
10 | 4 | workflow_dispatch: # allows manual triggering |
11 | 5 | inputs: |
|
43 | 37 |
|
44 | 38 | jobs: |
45 | 39 |
|
| 40 | + check_release: |
| 41 | + runs-on: [self-hosted, fast] |
| 42 | + |
| 43 | + outputs: |
| 44 | + should_release: ${{ steps.check.outputs.should_release }} |
| 45 | + |
| 46 | + steps: |
| 47 | + - id: check |
| 48 | + run: | |
| 49 | + if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then |
| 50 | + echo "should_release=true" >> $GITHUB_OUTPUT |
| 51 | + elif [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == "refs/heads/master" ]]; then |
| 52 | + if echo "${{ github.event.head_commit.message }}" | grep -q '\[no release\]'; then |
| 53 | + echo "should_release=false" >> $GITHUB_OUTPUT |
| 54 | + else |
| 55 | + echo "should_release=true" >> $GITHUB_OUTPUT |
| 56 | + fi |
| 57 | + else |
| 58 | + echo "should_release=false" >> $GITHUB_OUTPUT |
| 59 | + fi |
| 60 | +
|
46 | 61 | macos-cpu: |
| 62 | + needs: [check_release] |
| 63 | + if: ${{ needs.check_release.outputs.should_release == 'true' }} |
47 | 64 | strategy: |
48 | 65 | matrix: |
49 | 66 | include: |
@@ -114,6 +131,8 @@ jobs: |
114 | 131 | name: llama-bin-macos-${{ matrix.build }}.tar.gz |
115 | 132 |
|
116 | 133 | ubuntu-cpu: |
| 134 | + needs: [check_release] |
| 135 | + if: ${{ needs.check_release.outputs.should_release == 'true' }} |
117 | 136 | strategy: |
118 | 137 | matrix: |
119 | 138 | include: |
@@ -190,6 +209,8 @@ jobs: |
190 | 209 | name: llama-bin-ubuntu-${{ matrix.build }}.tar.gz |
191 | 210 |
|
192 | 211 | ubuntu-vulkan: |
| 212 | + needs: [check_release] |
| 213 | + if: ${{ needs.check_release.outputs.should_release == 'true' }} |
193 | 214 |
|
194 | 215 | strategy: |
195 | 216 | matrix: |
@@ -266,6 +287,8 @@ jobs: |
266 | 287 | name: llama-bin-ubuntu-vulkan-${{ matrix.build }}.tar.gz |
267 | 288 |
|
268 | 289 | android-arm64: |
| 290 | + needs: [check_release] |
| 291 | + if: ${{ needs.check_release.outputs.should_release == 'true' }} |
269 | 292 |
|
270 | 293 | runs-on: ubuntu-latest |
271 | 294 |
|
@@ -343,6 +366,8 @@ jobs: |
343 | 366 | name: llama-bin-android-arm64.tar.gz |
344 | 367 |
|
345 | 368 | ubuntu-24-openvino: |
| 369 | + needs: [check_release] |
| 370 | + if: ${{ needs.check_release.outputs.should_release == 'true' }} |
346 | 371 |
|
347 | 372 | runs-on: ubuntu-24.04 |
348 | 373 |
|
@@ -431,6 +456,8 @@ jobs: |
431 | 456 | name: llama-bin-ubuntu-openvino-${{ env.OPENVINO_VERSION_MAJOR }}-x64.tar.gz |
432 | 457 |
|
433 | 458 | windows-cpu: |
| 459 | + needs: [check_release] |
| 460 | + if: ${{ needs.check_release.outputs.should_release == 'true' }} |
434 | 461 |
|
435 | 462 | runs-on: windows-2025 |
436 | 463 |
|
@@ -491,6 +518,8 @@ jobs: |
491 | 518 | name: llama-bin-win-cpu-${{ matrix.arch }}.zip |
492 | 519 |
|
493 | 520 | windows: |
| 521 | + needs: [check_release] |
| 522 | + if: ${{ needs.check_release.outputs.should_release == 'true' }} |
494 | 523 |
|
495 | 524 | runs-on: windows-2025 |
496 | 525 |
|
@@ -581,6 +610,8 @@ jobs: |
581 | 610 | name: llama-bin-win-${{ matrix.backend }}-${{ matrix.arch }}.zip |
582 | 611 |
|
583 | 612 | windows-cuda: |
| 613 | + needs: [check_release] |
| 614 | + if: ${{ needs.check_release.outputs.should_release == 'true' }} |
584 | 615 |
|
585 | 616 | runs-on: windows-2022 |
586 | 617 |
|
@@ -869,6 +900,8 @@ jobs: |
869 | 900 | # name: llama-bin-ubuntu-sycl-${{ matrix.build }}-x64.tar.gz |
870 | 901 |
|
871 | 902 | ubuntu-22-rocm: |
| 903 | + needs: [check_release] |
| 904 | + if: ${{ needs.check_release.outputs.should_release == 'true' }} |
872 | 905 |
|
873 | 906 | runs-on: ubuntu-22.04 |
874 | 907 |
|
@@ -980,6 +1013,8 @@ jobs: |
980 | 1013 | name: llama-bin-ubuntu-rocm-${{ env.ROCM_VERSION_SHORT }}-${{ matrix.build }}.tar.gz |
981 | 1014 |
|
982 | 1015 | windows-hip: |
| 1016 | + needs: [check_release] |
| 1017 | + if: ${{ needs.check_release.outputs.should_release == 'true' }} |
983 | 1018 |
|
984 | 1019 | runs-on: windows-2022 |
985 | 1020 |
|
@@ -1094,6 +1129,8 @@ jobs: |
1094 | 1129 | name: llama-bin-win-hip-${{ matrix.name }}-x64.zip |
1095 | 1130 |
|
1096 | 1131 | ios-xcode-build: |
| 1132 | + needs: [check_release] |
| 1133 | + if: ${{ needs.check_release.outputs.should_release == 'true' }} |
1097 | 1134 | runs-on: macos-15 |
1098 | 1135 |
|
1099 | 1136 | steps: |
@@ -1242,6 +1279,8 @@ jobs: |
1242 | 1279 | # name: llama-bin-${{ matrix.chip_type }}-openEuler-${{ matrix.arch }}${{ matrix.use_acl_graph == 'on' && '-aclgraph' || '' }}.tar.gz |
1243 | 1280 |
|
1244 | 1281 | ui-build: |
| 1282 | + needs: [check_release] |
| 1283 | + if: ${{ needs.check_release.outputs.should_release == 'true' }} |
1245 | 1284 | uses: ./.github/workflows/ui-build.yml |
1246 | 1285 |
|
1247 | 1286 | release: |
|
0 commit comments