Skip to content

Commit f20dcfb

Browse files
author
john2ai
committed
πŸ› fix(ci): collect desktop bundles from the workspace-root target dir
desktop/ is a workspace member, so cargo tauri build emits bundles to target/<triple>/release/bundle, not desktop/target/... β€” the collect step found nothing, upload-artifact defaulted to warn, and v0.2.2 shipped with CLI tarballs only. The collect step now probes both locations and fails loudly, upload uses if-no-files-found: error, and the release job verifies all 8 artifact prefixes before publishing
1 parent 9a4ef25 commit f20dcfb

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

β€Ž.github/workflows/release.ymlβ€Ž

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,17 @@ jobs:
202202
shell: bash
203203
run: |
204204
set -euo pipefail
205+
# desktop/ is a workspace member, so `cargo tauri build` writes to
206+
# the WORKSPACE ROOT target dir, not desktop/target/. Try both.
205207
BUNDLE_DIR="desktop/target/${{ matrix.target }}/release/bundle"
208+
if [ ! -d "$BUNDLE_DIR" ]; then
209+
BUNDLE_DIR="target/${{ matrix.target }}/release/bundle"
210+
fi
211+
if [ ! -d "$BUNDLE_DIR" ]; then
212+
echo "::error::bundle directory not found (looked in desktop/target and target)"
213+
exit 1
214+
fi
215+
echo "Using bundle dir: $BUNDLE_DIR"
206216
OUTPUT_DIR="desktop-artifacts"
207217
mkdir -p "$OUTPUT_DIR"
208218
PREFIX="${{ matrix.asset_prefix }}"
@@ -302,6 +312,7 @@ jobs:
302312
with:
303313
name: ${{ matrix.asset_prefix }}
304314
path: desktop-artifacts/*
315+
if-no-files-found: error
305316

306317
release:
307318
name: Create GitHub Release
@@ -319,6 +330,27 @@ jobs:
319330
path: artifacts
320331
merge-multiple: true
321332

333+
# Guard: a release without desktop bundles is worse than no release β€”
334+
# desktop artifact collection used to silently no-op (wrong bundle path),
335+
# shipping a CLI-only release with green jobs.
336+
- name: Verify artifact completeness
337+
shell: bash
338+
run: |
339+
set -euo pipefail
340+
for prefix in syscity-desktop-linux-amd64 syscity-desktop-macos-arm64 syscity-desktop-macos-amd64 syscity-desktop-windows-amd64; do
341+
if ! ls artifacts/ | grep -q "^${prefix}"; then
342+
echo "::error::missing desktop artifacts for ${prefix}"
343+
exit 1
344+
fi
345+
done
346+
for prefix in syscity-linux-amd64 syscity-linux-arm64 syscity-macos-arm64 syscity-macos-amd64; do
347+
if ! ls artifacts/ | grep -q "^${prefix}\.tar\.gz$"; then
348+
echo "::error::missing CLI tarball for ${prefix}"
349+
exit 1
350+
fi
351+
done
352+
ls -la artifacts/
353+
322354
- name: Create Release
323355
uses: softprops/action-gh-release@v2
324356
with:

0 commit comments

Comments
Β (0)