Skip to content

Commit d090ed1

Browse files
authored
Merge pull request #6 from SillyLittleTech/codex/fix-windows-installer-not-found-error
Collect and upload all Windows installer artifacts in CI
2 parents 383db01 + 654c3ec commit d090ed1

2 files changed

Lines changed: 20 additions & 18 deletions

File tree

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,19 @@ jobs:
8080
run: |
8181
shopt -s nullglob globstar
8282
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
83+
cross-platform/src-tauri/target/release/bundle/nsis/**/*.exe
84+
cross-platform/src-tauri/target/release/bundle/msi/**/*.msi
8585
)
8686
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)"
87+
echo "No Windows installer artifacts found under cross-platform/src-tauri/target/release/bundle/{nsis,msi,wix}"
8888
exit 1
8989
fi
90-
installer_path="${installer_candidates[0]}"
91-
installer_ext="${installer_path##*.}"
92-
installer_name="PinStick-${APP_VERSION}-windows.${installer_ext}"
93-
cp "$installer_path" "$installer_name"
94-
printf "WINDOWS_INSTALLER=%s\n" "$installer_name" >> "$GITHUB_ENV"
90+
artifact_dir="PinStick-${APP_VERSION}-windows"
91+
mkdir -p "$artifact_dir"
92+
for installer_path in "${installer_candidates[@]}"; do
93+
cp "$installer_path" "$artifact_dir/"
94+
done
95+
printf "WINDOWS_ARTIFACT_DIR=%s\n" "$artifact_dir" >> "$GITHUB_ENV"
9596
9697
- name: Collect Linux AppImage
9798
if: matrix.os == 'ubuntu-22.04'
@@ -117,7 +118,7 @@ jobs:
117118
uses: actions/upload-artifact@v4
118119
with:
119120
name: PinStick-windows
120-
path: ${{ env.WINDOWS_INSTALLER }}
121+
path: ${{ env.WINDOWS_ARTIFACT_DIR }}
121122
if-no-files-found: error
122123

123124
- name: Upload Linux artifact

.github/workflows/prerelease.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,18 +87,19 @@ jobs:
8787
run: |
8888
shopt -s nullglob globstar
8989
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
90+
cross-platform/src-tauri/target/release/bundle/nsis/**/*.exe
91+
cross-platform/src-tauri/target/release/bundle/msi/**/*.msi
9292
)
9393
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)"
94+
echo "No Windows installer artifacts found under cross-platform/src-tauri/target/release/bundle/{nsis,msi,wix}"
9595
exit 1
9696
fi
97-
installer_path="${installer_candidates[0]}"
98-
installer_ext="${installer_path##*.}"
99-
installer_name="PinStick-${APP_VERSION}-windows.${installer_ext}"
100-
cp "$installer_path" "$installer_name"
101-
printf "WINDOWS_INSTALLER=%s\n" "$installer_name" >> "$GITHUB_ENV"
97+
artifact_dir="PinStick-${APP_VERSION}-windows"
98+
mkdir -p "$artifact_dir"
99+
for installer_path in "${installer_candidates[@]}"; do
100+
cp "$installer_path" "$artifact_dir/"
101+
done
102+
printf "WINDOWS_ARTIFACT_DIR=%s\n" "$artifact_dir" >> "$GITHUB_ENV"
102103
103104
- name: Collect Linux AppImage
104105
if: matrix.os == 'ubuntu-22.04'
@@ -124,7 +125,7 @@ jobs:
124125
uses: actions/upload-artifact@v4
125126
with:
126127
name: PinStick-windows
127-
path: ${{ env.WINDOWS_INSTALLER }}
128+
path: ${{ env.WINDOWS_ARTIFACT_DIR }}
128129
if-no-files-found: error
129130

130131
- name: Upload Linux artifact

0 commit comments

Comments
 (0)