Skip to content

Commit 6af3cf4

Browse files
Updated workflow for pipeline (#341)
1 parent 52c8052 commit 6af3cf4

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

.github/workflows/build-and-release.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ jobs:
347347
cargo tauri build --target ${{ matrix.rust_target }} --bundles ${{ matrix.tauri_bundle }}
348348
349349
- name: Upload artifact (macOS)
350-
if: startsWith(matrix.platform, 'macos')
350+
if: startsWith(matrix.platform, 'macos') && startsWith(github.ref, 'refs/tags/v')
351351
uses: actions/upload-artifact@v4
352352
with:
353353
name: MindWork AI Studio (macOS ${{ matrix.dotnet_runtime }})
@@ -358,7 +358,7 @@ jobs:
358358
retention-days: ${{ env.RETENTION_INTERMEDIATE_ASSETS }}
359359

360360
- name: Upload artifact (Windows - MSI)
361-
if: startsWith(matrix.platform, 'windows') && contains(matrix.tauri_bundle, 'msi')
361+
if: startsWith(matrix.platform, 'windows') && contains(matrix.tauri_bundle, 'msi') && startsWith(github.ref, 'refs/tags/v')
362362
uses: actions/upload-artifact@v4
363363
with:
364364
name: MindWork AI Studio (Windows - MSI ${{ matrix.dotnet_runtime }})
@@ -369,7 +369,7 @@ jobs:
369369
retention-days: ${{ env.RETENTION_INTERMEDIATE_ASSETS }}
370370

371371
- name: Upload artifact (Windows - NSIS)
372-
if: startsWith(matrix.platform, 'windows') && contains(matrix.tauri_bundle, 'nsis')
372+
if: startsWith(matrix.platform, 'windows') && contains(matrix.tauri_bundle, 'nsis') && startsWith(github.ref, 'refs/tags/v')
373373
uses: actions/upload-artifact@v4
374374
with:
375375
name: MindWork AI Studio (Windows - NSIS ${{ matrix.dotnet_runtime }})
@@ -380,7 +380,7 @@ jobs:
380380
retention-days: ${{ env.RETENTION_INTERMEDIATE_ASSETS }}
381381

382382
- name: Upload artifact (Linux - Debian Package)
383-
if: startsWith(matrix.platform, 'ubuntu') && contains(matrix.tauri_bundle, 'deb')
383+
if: startsWith(matrix.platform, 'ubuntu') && contains(matrix.tauri_bundle, 'deb') && startsWith(github.ref, 'refs/tags/v')
384384
uses: actions/upload-artifact@v4
385385
with:
386386
name: MindWork AI Studio (Linux - deb ${{ matrix.dotnet_runtime }})
@@ -390,7 +390,7 @@ jobs:
390390
retention-days: ${{ env.RETENTION_INTERMEDIATE_ASSETS }}
391391

392392
- name: Upload artifact (Linux - AppImage)
393-
if: startsWith(matrix.platform, 'ubuntu') && contains(matrix.tauri_bundle, 'appimage')
393+
if: startsWith(matrix.platform, 'ubuntu') && contains(matrix.tauri_bundle, 'appimage') && startsWith(github.ref, 'refs/tags/v')
394394
uses: actions/upload-artifact@v4
395395
with:
396396
name: MindWork AI Studio (Linux - AppImage ${{ matrix.dotnet_runtime }})
@@ -538,11 +538,14 @@ jobs:
538538
if: ${{ steps.linux_arm_cache.outputs.cache-hit != 'true' && env.SKIP != 'true' }}
539539
run: |
540540
mv ${{ steps.build-linux-arm-runner.outputs.image }} ${{ runner.temp }}/linux_arm_qemu_cache.img
541-
542-
- name: Delete previous artifact, which may exist due to caching (Linux - Debian Package)
543-
if: ${{ env.SKIP != 'true' }}
544-
run: |
545-
rm -f result/target/aarch64-unknown-linux-gnu/release/bundle/deb/mind-work-ai-studio_*.deb
541+
542+
#
543+
# This step does not work, because we start a VM with qemu to run the build.
544+
#
545+
#- name: Delete previous artifact, which may exist due to caching (Linux - Debian Package)
546+
# if: ${{ env.SKIP != 'true' }}
547+
# run: |
548+
# rm -f result/target/aarch64-unknown-linux-gnu/release/bundle/deb/mind-work-ai-studio_*.deb
546549

547550
- name: Build Tauri project
548551
if: ${{ env.SKIP != 'true' }}
@@ -568,6 +571,9 @@ jobs:
568571

569572
shell: /bin/bash
570573
commands: |
574+
# Delete all previous artifacts, which may exist due to caching:
575+
rm -f result/target/aarch64-unknown-linux-gnu/release/bundle/deb/mind-work-ai-studio_*.deb
576+
571577
export HOME=/root
572578
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
573579
source "$HOME/.cargo/env"
@@ -590,7 +596,7 @@ jobs:
590596
mv ${{ steps.build-linux-arm.outputs.image }} $RUNNER_TEMP/linux_arm_qemu_cache.img
591597
592598
- name: Upload artifact (Linux - Debian Package)
593-
if: ${{ env.SKIP != 'true' }}
599+
if: ${{ env.SKIP != 'true' && startsWith(github.ref, 'refs/tags/v') }}
594600
uses: actions/upload-artifact@v4
595601
with:
596602
name: MindWork AI Studio (Linux - deb linux-arm64)

0 commit comments

Comments
 (0)