Skip to content

Commit 383db01

Browse files
authored
Merge pull request #5 from SillyLittleTech/codex/fix-windows-installer-not-found-error
Harden Windows installer artifact detection in CI workflows
2 parents c50e071 + 246f45a commit 383db01

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,16 @@ jobs:
7878
if: matrix.os == 'windows-2022'
7979
shell: bash
8080
run: |
81-
shopt -s nullglob
82-
src=(
83-
cross-platform/src-tauri/target/release/bundle/nsis/*.exe
84-
cross-platform/src-tauri/target/release/bundle/msi/*.msi
81+
shopt -s nullglob globstar
82+
installer_candidates=(
83+
cross-platform/src-tauri/target/release/bundle/**/*[Ss][Ee][Tt][Uu][Pp]*.exe
84+
cross-platform/src-tauri/target/release/bundle/**/*.msi
8585
)
86-
if [ ${#src[@]} -eq 0 ]; then
87-
echo "No Windows installer found (expected NSIS .exe or MSI .msi)"
86+
if [ ${#installer_candidates[@]} -eq 0 ]; then
87+
echo "No Windows installer-like artifacts found under cross-platform/src-tauri/target/release/bundle (expected *setup*.exe or .msi)"
8888
exit 1
8989
fi
90-
installer_path="${src[0]}"
90+
installer_path="${installer_candidates[0]}"
9191
installer_ext="${installer_path##*.}"
9292
installer_name="PinStick-${APP_VERSION}-windows.${installer_ext}"
9393
cp "$installer_path" "$installer_name"

.github/workflows/prerelease.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,16 @@ jobs:
8585
if: matrix.os == 'windows-2022'
8686
shell: bash
8787
run: |
88-
shopt -s nullglob
89-
src=(
90-
cross-platform/src-tauri/target/release/bundle/nsis/*.exe
91-
cross-platform/src-tauri/target/release/bundle/msi/*.msi
88+
shopt -s nullglob globstar
89+
installer_candidates=(
90+
cross-platform/src-tauri/target/release/bundle/**/*[Ss][Ee][Tt][Uu][Pp]*.exe
91+
cross-platform/src-tauri/target/release/bundle/**/*.msi
9292
)
93-
if [ ${#src[@]} -eq 0 ]; then
94-
echo "No Windows installer found (expected NSIS .exe or MSI .msi)"
93+
if [ ${#installer_candidates[@]} -eq 0 ]; then
94+
echo "No Windows installer-like artifacts found under cross-platform/src-tauri/target/release/bundle (expected *setup*.exe or .msi)"
9595
exit 1
9696
fi
97-
installer_path="${src[0]}"
97+
installer_path="${installer_candidates[0]}"
9898
installer_ext="${installer_path##*.}"
9999
installer_name="PinStick-${APP_VERSION}-windows.${installer_ext}"
100100
cp "$installer_path" "$installer_name"

0 commit comments

Comments
 (0)