6969
7070 - name : Build cross-platform app
7171 working-directory : cross-platform
72- run : npm run build -- --verbose
72+ shell : bash
73+ run : |
74+ case "${{ runner.os }}" in
75+ Windows)
76+ npm run tauri -- build --bundles nsis,msi --verbose
77+ ;;
78+ Linux)
79+ npm run tauri -- build --bundles appimage --verbose
80+ ;;
81+ macOS)
82+ npm run tauri -- build --bundles app --verbose
83+ ;;
84+ *)
85+ echo "Unsupported runner OS: ${{ runner.os }}"
86+ exit 1
87+ ;;
88+ esac
7389
7490 - name : Package macOS app bundle
7591 if : matrix.os == 'macos-14'
@@ -86,19 +102,27 @@ jobs:
86102 shell : bash
87103 run : |
88104 shopt -s nullglob globstar
89- installer_candidates=(
90- cross-platform/src-tauri/target/release/bundle/nsis/**/*.exe
91- cross-platform/src-tauri/target/release/bundle/msi/**/*.msi
105+ release_dir="cross-platform/src-tauri/target/release"
106+ bundle_dir="$release_dir/bundle"
107+ msi_candidates=(
108+ "$bundle_dir"/**/*.msi
109+ )
110+ portable_candidates=(
111+ "$release_dir"/*.exe
92112 )
93- if [ ${#installer_candidates[@]} -eq 0 ]; then
94- echo "No Windows installer artifacts found under cross-platform/src-tauri/target/release/bundle/{nsis,msi,wix}"
95- exit 1
96- fi
97113 artifact_dir="PinStick-${APP_VERSION}-windows"
98114 mkdir -p "$artifact_dir"
99- for installer_path in "${installer_candidates[@]}"; do
100- cp "$installer_path" "$artifact_dir/"
101- done
115+ if [ ${#msi_candidates[@]} -eq 0 ] || [ ${#portable_candidates[@]} -eq 0 ]; then
116+ echo "Expected MSI installer under $bundle_dir and portable EXE under $release_dir"
117+ if [ -d "$release_dir" ]; then
118+ find "$release_dir" -maxdepth 4 -type f | sort
119+ else
120+ echo "Release directory missing: $release_dir"
121+ fi
122+ exit 1
123+ fi
124+ cp "${msi_candidates[0]}" "$artifact_dir/PinStick-install.msi"
125+ cp "${portable_candidates[0]}" "$artifact_dir/PinStick-portable.exe"
102126 printf "WINDOWS_ARTIFACT_DIR=%s\n" "$artifact_dir" >> "$GITHUB_ENV"
103127
104128 - name : Collect Linux AppImage
0 commit comments