Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 35 additions & 11 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,23 @@ jobs:

- name: Build cross-platform app
working-directory: cross-platform
run: npm run build -- --verbose
shell: bash
run: |
case "${{ matrix.os }}" in
windows-2022)
npx tauri build --bundles nsis,msi --verbose
;;
ubuntu-22.04)
npx tauri build --bundles appimage --verbose
;;
macos-14)
npx tauri build --bundles app --verbose
;;
*)
echo "Unsupported runner: ${{ matrix.os }}"
exit 1
;;
esac

- name: Package macOS app bundle
if: matrix.os == 'macos-14'
Expand All @@ -79,19 +95,27 @@ jobs:
shell: bash
run: |
shopt -s nullglob globstar
installer_candidates=(
cross-platform/src-tauri/target/release/bundle/nsis/**/*.exe
cross-platform/src-tauri/target/release/bundle/msi/**/*.msi
release_dir="cross-platform/src-tauri/target/release"
bundle_dir="$release_dir/bundle"
msi_candidates=(
"$bundle_dir"/**/*.msi
)
portable_candidates=(
"$release_dir"/*.exe
)
if [ ${#installer_candidates[@]} -eq 0 ]; then
echo "No Windows installer artifacts found under cross-platform/src-tauri/target/release/bundle/{nsis,msi,wix}"
exit 1
fi
artifact_dir="PinStick-${APP_VERSION}-windows"
mkdir -p "$artifact_dir"
for installer_path in "${installer_candidates[@]}"; do
cp "$installer_path" "$artifact_dir/"
done
if [ ${#msi_candidates[@]} -eq 0 ] || [ ${#portable_candidates[@]} -eq 0 ]; then
echo "Expected MSI installer under $bundle_dir and portable EXE under $release_dir"
if [ -d "$release_dir" ]; then
find "$release_dir" -maxdepth 4 -type f | sort
else
echo "Release directory missing: $release_dir"
fi
exit 1
fi
cp "${msi_candidates[0]}" "$artifact_dir/PinStick-install.msi"
cp "${portable_candidates[0]}" "$artifact_dir/PinStick-portable.exe"
printf "WINDOWS_ARTIFACT_DIR=%s\n" "$artifact_dir" >> "$GITHUB_ENV"

- name: Collect Linux AppImage
Expand Down
46 changes: 35 additions & 11 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,23 @@ jobs:

- name: Build cross-platform app
working-directory: cross-platform
run: npm run build -- --verbose
shell: bash
run: |
case "${{ runner.os }}" in
Windows)
npm run tauri -- build --bundles nsis,msi --verbose
;;
Linux)
npm run tauri -- build --bundles appimage --verbose
;;
macOS)
npm run tauri -- build --bundles app --verbose
;;
*)
echo "Unsupported runner OS: ${{ runner.os }}"
exit 1
;;
esac

- name: Package macOS app bundle
if: matrix.os == 'macos-14'
Expand All @@ -86,19 +102,27 @@ jobs:
shell: bash
run: |
shopt -s nullglob globstar
installer_candidates=(
cross-platform/src-tauri/target/release/bundle/nsis/**/*.exe
cross-platform/src-tauri/target/release/bundle/msi/**/*.msi
release_dir="cross-platform/src-tauri/target/release"
bundle_dir="$release_dir/bundle"
msi_candidates=(
"$bundle_dir"/**/*.msi
)
portable_candidates=(
"$release_dir"/*.exe
)
if [ ${#installer_candidates[@]} -eq 0 ]; then
echo "No Windows installer artifacts found under cross-platform/src-tauri/target/release/bundle/{nsis,msi,wix}"
exit 1
fi
artifact_dir="PinStick-${APP_VERSION}-windows"
mkdir -p "$artifact_dir"
for installer_path in "${installer_candidates[@]}"; do
cp "$installer_path" "$artifact_dir/"
done
if [ ${#msi_candidates[@]} -eq 0 ] || [ ${#portable_candidates[@]} -eq 0 ]; then
echo "Expected MSI installer under $bundle_dir and portable EXE under $release_dir"
if [ -d "$release_dir" ]; then
find "$release_dir" -maxdepth 4 -type f | sort
else
echo "Release directory missing: $release_dir"
fi
exit 1
fi
cp "${msi_candidates[0]}" "$artifact_dir/PinStick-install.msi"
cp "${portable_candidates[0]}" "$artifact_dir/PinStick-portable.exe"
printf "WINDOWS_ARTIFACT_DIR=%s\n" "$artifact_dir" >> "$GITHUB_ENV"

- name: Collect Linux AppImage
Expand Down
4 changes: 3 additions & 1 deletion cross-platform/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"build": {
"beforeBuildCommand": "",
"beforeDevCommand": "",
"withGlobalTauri": true,
"devPath": "../src",
"distDir": "../src"
},
Expand All @@ -14,7 +15,8 @@
"active": true,
"identifier": "slf.pinstick",
"icon": [
"icons/icon.png"
"icons/icon.png",
"icons/icon.ico"
]
},
"windows": [
Expand Down