@@ -85,12 +85,14 @@ jobs:
8585
8686 - name : Pack artifacts
8787 id : pack_artifacts
88+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
8889 run : |
8990 cp LICENSE ./build/bin/
9091 cp examples/run/linenoise.cpp/LICENSE ./build/bin/LICENSE.linenoise.cpp
9192 zip -r llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.zip ./build/bin/*
9293
9394 - name : Upload artifacts
95+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
9496 uses : actions/upload-artifact@v4
9597 with :
9698 path : llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.zip
@@ -147,12 +149,14 @@ jobs:
147149
148150 - name : Pack artifacts
149151 id : pack_artifacts
152+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
150153 run : |
151154 cp LICENSE ./build/bin/
152155 cp examples/run/linenoise.cpp/LICENSE ./build/bin/LICENSE.linenoise.cpp
153156 zip -r llama-${{ steps.tag.outputs.name }}-bin-macos-x64.zip ./build/bin/*
154157
155158 - name : Upload artifacts
159+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
156160 uses : actions/upload-artifact@v4
157161 with :
158162 path : llama-${{ steps.tag.outputs.name }}-bin-macos-x64.zip
@@ -217,12 +221,14 @@ jobs:
217221
218222 - name : Pack artifacts
219223 id : pack_artifacts
224+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
220225 run : |
221226 cp LICENSE ./build/bin/
222227 cp examples/run/linenoise.cpp/LICENSE ./build/bin/LICENSE.linenoise.cpp
223228 zip -r llama-${{ steps.tag.outputs.name }}-bin-ubuntu-x64.zip ./build/bin/*
224229
225230 - name : Upload artifacts
231+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
226232 uses : actions/upload-artifact@v4
227233 with :
228234 path : llama-${{ steps.tag.outputs.name }}-bin-ubuntu-x64.zip
@@ -784,12 +790,14 @@ jobs:
784790
785791 - name : Pack artifacts
786792 id : pack_artifacts
793+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
787794 run : |
788795 Copy-Item LICENSE .\build\bin\Release\llama.cpp.txt
789796 Copy-Item .\examples\run\linenoise.cpp\LICENSE .\build\bin\Release\linenoise.cpp.txt
790797 7z a llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}.zip .\build\bin\Release\*
791798
792799 - name : Upload artifacts
800+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
793801 uses : actions/upload-artifact@v4
794802 with :
795803 path : llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}.zip
@@ -932,16 +940,19 @@ jobs:
932940
933941 - name : Pack artifacts
934942 id : pack_artifacts
943+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
935944 run : |
936945 7z a llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}-cu${{ matrix.cuda }}-x64.zip .\build\bin\Release\*
937946
938947 - name : Upload artifacts
948+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
939949 uses : actions/upload-artifact@v4
940950 with :
941951 path : llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}-cu${{ matrix.cuda }}-x64.zip
942952 name : llama-bin-win-cu${{ matrix.cuda }}-x64.zip
943953
944954 - name : Copy and pack Cuda runtime
955+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
945956 run : |
946957 echo "Cuda install location: ${{ env.CUDA_PATH }}"
947958 $dst='.\build\bin\cudart\'
@@ -950,6 +961,7 @@ jobs:
950961 7z a cudart-llama-bin-win-cu${{ matrix.cuda }}-x64.zip $dst\*
951962
952963 - name : Upload Cuda runtime
964+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
953965 uses : actions/upload-artifact@v4
954966 with :
955967 path : cudart-llama-bin-win-cu${{ matrix.cuda }}-x64.zip
@@ -996,6 +1008,7 @@ jobs:
9961008
9971009 - name : Build the release package
9981010 id : pack_artifacts
1011+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
9991012 run : |
10001013 echo "cp oneAPI running time dll files in ${{ env.ONEAPI_ROOT }} to ./build/bin"
10011014
@@ -1020,6 +1033,7 @@ jobs:
10201033 7z a llama-${{ steps.tag.outputs.name }}-bin-win-sycl-x64.zip ./build/bin/*
10211034
10221035 - name : Upload the release package
1036+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
10231037 uses : actions/upload-artifact@v4
10241038 with :
10251039 path : llama-${{ steps.tag.outputs.name }}-bin-win-sycl-x64.zip
0 commit comments