@@ -84,12 +84,14 @@ jobs:
8484
8585 - name : Pack artifacts
8686 id : pack_artifacts
87+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
8788 run : |
8889 cp LICENSE ./build/bin/
8990 cp examples/run/linenoise.cpp/LICENSE ./build/bin/LICENSE.linenoise.cpp
9091 zip -r llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.zip ./build/bin/*
9192
9293 - name : Upload artifacts
94+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
9395 uses : actions/upload-artifact@v4
9496 with :
9597 path : llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.zip
@@ -145,12 +147,14 @@ jobs:
145147
146148 - name : Pack artifacts
147149 id : pack_artifacts
150+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
148151 run : |
149152 cp LICENSE ./build/bin/
150153 cp examples/run/linenoise.cpp/LICENSE ./build/bin/LICENSE.linenoise.cpp
151154 zip -r llama-${{ steps.tag.outputs.name }}-bin-macos-x64.zip ./build/bin/*
152155
153156 - name : Upload artifacts
157+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
154158 uses : actions/upload-artifact@v4
155159 with :
156160 path : llama-${{ steps.tag.outputs.name }}-bin-macos-x64.zip
@@ -215,12 +219,14 @@ jobs:
215219
216220 - name : Pack artifacts
217221 id : pack_artifacts
222+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
218223 run : |
219224 cp LICENSE ./build/bin/
220225 cp examples/run/linenoise.cpp/LICENSE ./build/bin/LICENSE.linenoise.cpp
221226 zip -r llama-${{ steps.tag.outputs.name }}-bin-ubuntu-x64.zip ./build/bin/*
222227
223228 - name : Upload artifacts
229+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
224230 uses : actions/upload-artifact@v4
225231 with :
226232 path : llama-${{ steps.tag.outputs.name }}-bin-ubuntu-x64.zip
@@ -817,12 +823,14 @@ jobs:
817823
818824 - name : Pack artifacts
819825 id : pack_artifacts
826+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
820827 run : |
821828 Copy-Item LICENSE .\build\bin\Release\llama.cpp.txt
822829 Copy-Item .\examples\run\linenoise.cpp\LICENSE .\build\bin\Release\linenoise.cpp.txt
823830 7z a llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}.zip .\build\bin\Release\*
824831
825832 - name : Upload artifacts
833+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
826834 uses : actions/upload-artifact@v4
827835 with :
828836 path : llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}.zip
@@ -965,16 +973,19 @@ jobs:
965973
966974 - name : Pack artifacts
967975 id : pack_artifacts
976+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
968977 run : |
969978 7z a llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}-cu${{ matrix.cuda }}-x64.zip .\build\bin\Release\*
970979
971980 - name : Upload artifacts
981+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
972982 uses : actions/upload-artifact@v4
973983 with :
974984 path : llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}-cu${{ matrix.cuda }}-x64.zip
975985 name : llama-bin-win-cu${{ matrix.cuda }}-x64.zip
976986
977987 - name : Copy and pack Cuda runtime
988+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
978989 run : |
979990 echo "Cuda install location: ${{ env.CUDA_PATH }}"
980991 $dst='.\build\bin\cudart\'
@@ -983,6 +994,7 @@ jobs:
983994 7z a cudart-llama-bin-win-cu${{ matrix.cuda }}-x64.zip $dst\*
984995
985996 - name : Upload Cuda runtime
997+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
986998 uses : actions/upload-artifact@v4
987999 with :
9881000 path : cudart-llama-bin-win-cu${{ matrix.cuda }}-x64.zip
@@ -1029,6 +1041,7 @@ jobs:
10291041
10301042 - name : Build the release package
10311043 id : pack_artifacts
1044+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
10321045 run : |
10331046 echo "cp oneAPI running time dll files in ${{ env.ONEAPI_ROOT }} to ./build/bin"
10341047
@@ -1053,6 +1066,7 @@ jobs:
10531066 7z a llama-${{ steps.tag.outputs.name }}-bin-win-sycl-x64.zip ./build/bin/*
10541067
10551068 - name : Upload the release package
1069+ if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
10561070 uses : actions/upload-artifact@v4
10571071 with :
10581072 path : llama-${{ steps.tag.outputs.name }}-bin-win-sycl-x64.zip
0 commit comments