diff --git a/.github/workflows/desktop-package.yml b/.github/workflows/desktop-package.yml index 9da9796..e82eb23 100644 --- a/.github/workflows/desktop-package.yml +++ b/.github/workflows/desktop-package.yml @@ -32,12 +32,19 @@ jobs: - name: macOS arm64 runner: macos-14 bundles: app,dmg + artifact_path: desktop/src-tauri/target/release/bundle/dmg/*.dmg - name: Windows x64 runner: windows-2022 bundles: msi,nsis + artifact_path: | + desktop/src-tauri/target/release/bundle/msi/*.msi + desktop/src-tauri/target/release/bundle/nsis/*.exe - name: Linux x64 runner: ubuntu-22.04 bundles: appimage,deb + artifact_path: | + desktop/src-tauri/target/release/bundle/appimage/*.AppImage + desktop/src-tauri/target/release/bundle/deb/*.deb steps: - uses: actions/checkout@v7 - uses: actions/setup-node@v7 @@ -133,5 +140,6 @@ jobs: uses: actions/upload-artifact@v7 with: name: soca-${{ runner.os }}-${{ runner.arch }} - path: desktop/src-tauri/target/release/bundle/ + path: ${{ matrix.artifact_path }} if-no-files-found: error + compression-level: 0 diff --git a/tests/test_tauri_release_config.py b/tests/test_tauri_release_config.py index a88e6df..2163ff0 100644 --- a/tests/test_tauri_release_config.py +++ b/tests/test_tauri_release_config.py @@ -64,3 +64,18 @@ def test_linux_package_workflow_keeps_the_cuda_driver_on_the_host() -> None: assert "LINUXDEPLOY_EXCLUDED_LIBRARIES" in workflow assert "libcuda.so*" in workflow assert "XDG_CACHE_HOME: ${{ runner.temp }}/soca-cache" in workflow + + +def test_package_workflow_uploads_only_installable_artifacts() -> None: + workflow = ( + Path(__file__).resolve().parents[1] / ".github" / "workflows" / "desktop-package.yml" + ).read_text(encoding="utf-8") + + assert " path: desktop/src-tauri/target/release/bundle/\n" not in workflow + assert "bundle/dmg/*.dmg" in workflow + assert "bundle/msi/*.msi" in workflow + assert "bundle/nsis/*.exe" in workflow + assert "bundle/appimage/*.AppImage" in workflow + assert "bundle/deb/*.deb" in workflow + assert "path: ${{ matrix.artifact_path }}" in workflow + assert "compression-level: 0" in workflow