mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2025-12-13 05:48:56 +00:00
chore: fix workflow (#836)
This commit is contained in:
parent
79426d578e
commit
1e5f207006
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
@ -254,7 +254,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Copy and pack Cuda runtime
|
- name: Copy and pack Cuda runtime
|
||||||
id: pack_cuda_runtime
|
id: pack_cuda_runtime
|
||||||
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.build == 'cuda12' ) || github.event.inputs.create_release == 'true' }}
|
if: ${{ matrix.build == 'cuda12' && (github.event_name == 'push' && github.ref == 'refs/heads/master' || github.event.inputs.create_release == 'true') }}
|
||||||
run: |
|
run: |
|
||||||
echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}"
|
echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}"
|
||||||
$dst='.\build\bin\cudart\'
|
$dst='.\build\bin\cudart\'
|
||||||
@ -262,7 +262,7 @@ jobs:
|
|||||||
7z a cudart-sd-bin-win-cu12-x64.zip $dst\*
|
7z a cudart-sd-bin-win-cu12-x64.zip $dst\*
|
||||||
|
|
||||||
- name: Upload Cuda runtime
|
- name: Upload Cuda runtime
|
||||||
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.build == 'cuda12' ) || github.event.inputs.create_release == 'true' }}
|
if: ${{ matrix.build == 'cuda12' && (github.event_name == 'push' && github.ref == 'refs/heads/master' || github.event.inputs.create_release == 'true') }}
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: sd-cudart-sd-bin-win-cu12-x64.zip
|
name: sd-cudart-sd-bin-win-cu12-x64.zip
|
||||||
@ -288,6 +288,11 @@ jobs:
|
|||||||
- windows-latest-cmake
|
- windows-latest-cmake
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Clone
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
id: download-artifact
|
id: download-artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
@ -298,7 +303,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Get commit count
|
- name: Get commit count
|
||||||
id: commit_count
|
id: commit_count
|
||||||
run: echo "count=$(git rev-list --count HEAD)" >> $GITHUB_OUTPUT
|
run: |
|
||||||
|
echo "count=$(git rev-list --count HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Get commit hash
|
- name: Get commit hash
|
||||||
id: commit
|
id: commit
|
||||||
@ -306,17 +312,16 @@ jobs:
|
|||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
id: create_release
|
id: create_release
|
||||||
|
if: ${{ github.event_name == 'workflow_dispatch' || github.ref_name == 'master' }}
|
||||||
uses: anzz1/action-create-release@v1
|
uses: anzz1/action-create-release@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
tag_name: >
|
tag_name: ${{ format('{0}-{1}-{2}', env.BRANCH_NAME, steps.commit_count.outputs.count, steps.commit.outputs.short) }}
|
||||||
${{ github.ref_name == 'master' &&
|
|
||||||
format('release_{0}_{1}', steps.commit_count.outputs.count, steps.commit.outputs.short) ||
|
|
||||||
format('{0}-{1}', env.BRANCH_NAME, steps.commit.outputs.short) }}
|
|
||||||
|
|
||||||
- name: Upload release
|
- name: Upload release
|
||||||
id: upload_release
|
id: upload_release
|
||||||
|
if: ${{ github.event_name == 'workflow_dispatch' || github.ref_name == 'master' }}
|
||||||
uses: actions/github-script@v3
|
uses: actions/github-script@v3
|
||||||
with:
|
with:
|
||||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user