@@ -254,15 +254,15 @@ jobs:
254
254
255
255
- name : Copy and pack Cuda runtime
256
256
id : pack_cuda_runtime
257
- if : ${{ ( github.event_name == 'push ' && github.ref == 'refs/heads/master ' && matrix.build == 'cuda12' ) || github.event.inputs.create_release == 'true' }}
257
+ if : ${{ matrix.build == 'cuda12 ' && ( github.event_name == 'push ' && github.ref == 'refs/heads/master' || github.event.inputs.create_release == 'true') }}
258
258
run : |
259
259
echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}"
260
260
$dst='.\build\bin\cudart\'
261
261
robocopy "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin" $dst cudart64_*.dll cublas64_*.dll cublasLt64_*.dll
262
262
7z a cudart-sd-bin-win-cu12-x64.zip $dst\*
263
263
264
264
- name : Upload Cuda runtime
265
- if : ${{ ( github.event_name == 'push ' && github.ref == 'refs/heads/master ' && matrix.build == 'cuda12' ) || github.event.inputs.create_release == 'true' }}
265
+ if : ${{ matrix.build == 'cuda12 ' && ( github.event_name == 'push ' && github.ref == 'refs/heads/master' || github.event.inputs.create_release == 'true') }}
266
266
uses : actions/upload-artifact@v4
267
267
with :
268
268
name : sd-cudart-sd-bin-win-cu12-x64.zip
@@ -288,6 +288,11 @@ jobs:
288
288
- windows-latest-cmake
289
289
290
290
steps :
291
+ - name : Clone
292
+ uses : actions/checkout@v3
293
+ with :
294
+ fetch-depth : 0
295
+
291
296
- name : Download artifacts
292
297
id : download-artifact
293
298
uses : actions/download-artifact@v4
@@ -298,25 +303,25 @@ jobs:
298
303
299
304
- name : Get commit count
300
305
id : commit_count
301
- run : echo "count=$(git rev-list --count HEAD)" >> $GITHUB_OUTPUT
306
+ run : |
307
+ echo "count=$(git rev-list --count HEAD)" >> $GITHUB_OUTPUT
302
308
303
309
- name : Get commit hash
304
310
id : commit
305
311
uses : pr-mpt/actions-commit-hash@v2
306
312
307
313
- name : Create release
308
314
id : create_release
315
+ if : ${{ github.event_name == 'workflow_dispatch' || github.ref_name == 'master' }}
309
316
uses : anzz1/action-create-release@v1
310
317
env :
311
318
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
312
319
with :
313
- tag_name : >
314
- ${{ github.ref_name == 'master' &&
315
- format('release_{0}_{1}', steps.commit_count.outputs.count, steps.commit.outputs.short) ||
316
- format('{0}-{1}', env.BRANCH_NAME, steps.commit.outputs.short) }}
320
+ tag_name : ${{ format('{0}-{1}-{2}', env.BRANCH_NAME, steps.commit_count.outputs.count, steps.commit.outputs.short) }}
317
321
318
322
- name : Upload release
319
323
id : upload_release
324
+ if : ${{ github.event_name == 'workflow_dispatch' || github.ref_name == 'master' }}
320
325
uses : actions/github-script@v3
321
326
with :
322
327
github-token : ${{secrets.GITHUB_TOKEN}}
0 commit comments