From 00abd452c3f4d6dd03dd80828f515464c1530692 Mon Sep 17 00:00:00 2001 From: Kiya Rose Ren-Miyakari Date: Sun, 29 Mar 2026 20:07:07 -0400 Subject: [PATCH 1/4] Add .ico bundle icon for Windows Tauri builds --- .github/workflows/build-and-release.yml | 62 ++++++++++++++++++------ .github/workflows/prerelease.yml | 62 ++++++++++++++++++------ cross-platform/src-tauri/tauri.conf.json | 3 +- 3 files changed, 98 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index c9e2b78..2a59b05 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -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) + npm run tauri -- build --bundles nsis,msi --verbose + ;; + ubuntu-22.04) + npm run tauri -- build --bundles appimage --verbose + ;; + macos-14) + npm run tauri -- build --bundles app --verbose + ;; + *) + echo "Unsupported runner: ${{ matrix.os }}" + exit 1 + ;; + esac - name: Package macOS app bundle if: matrix.os == 'macos-14' @@ -78,20 +94,38 @@ jobs: if: matrix.os == 'windows-2022' shell: bash run: | - shopt -s nullglob - src=( - cross-platform/src-tauri/target/release/bundle/nsis/*.exe - cross-platform/src-tauri/target/release/bundle/msi/*.msi + shopt -s nullglob globstar + release_dir="cross-platform/src-tauri/target/release" + bundle_dir="$release_dir/bundle" + installer_candidates=( + "$bundle_dir"/**/*.msi + "$bundle_dir"/**/*.exe ) - if [ ${#src[@]} -eq 0 ]; then - echo "No Windows installer found (expected NSIS .exe or MSI .msi)" - exit 1 + artifact_dir="PinStick-${APP_VERSION}-windows" + mkdir -p "$artifact_dir" + if [ ${#installer_candidates[@]} -gt 0 ]; then + for installer_path in "${installer_candidates[@]}"; do + cp "$installer_path" "$artifact_dir/" + done + else + echo "No installers found under $bundle_dir; printing release directory for debugging." + if [ -d "$release_dir" ]; then + find "$release_dir" -maxdepth 4 -type f | sort + else + echo "Release directory missing: $release_dir" + fi + portable_candidates=( + "$release_dir"/*.exe + ) + if [ ${#portable_candidates[@]} -eq 0 ]; then + echo "No Windows installer or portable .exe artifacts found under $release_dir" + exit 1 + fi + for portable_path in "${portable_candidates[@]}"; do + cp "$portable_path" "$artifact_dir/" + done fi - installer_path="${src[0]}" - installer_ext="${installer_path##*.}" - installer_name="PinStick-${APP_VERSION}-windows.${installer_ext}" - cp "$installer_path" "$installer_name" - printf "WINDOWS_INSTALLER=%s\n" "$installer_name" >> "$GITHUB_ENV" + printf "WINDOWS_ARTIFACT_DIR=%s\n" "$artifact_dir" >> "$GITHUB_ENV" - name: Collect Linux AppImage if: matrix.os == 'ubuntu-22.04' @@ -117,7 +151,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: PinStick-windows - path: ${{ env.WINDOWS_INSTALLER }} + path: ${{ env.WINDOWS_ARTIFACT_DIR }} if-no-files-found: error - name: Upload Linux artifact diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 9bddc1d..3bdfb90 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -69,7 +69,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) + npm run tauri -- build --bundles nsis,msi --verbose + ;; + ubuntu-22.04) + npm run tauri -- build --bundles appimage --verbose + ;; + macos-14) + npm run tauri -- build --bundles app --verbose + ;; + *) + echo "Unsupported runner: ${{ matrix.os }}" + exit 1 + ;; + esac - name: Package macOS app bundle if: matrix.os == 'macos-14' @@ -85,20 +101,38 @@ jobs: if: matrix.os == 'windows-2022' shell: bash run: | - shopt -s nullglob - src=( - cross-platform/src-tauri/target/release/bundle/nsis/*.exe - cross-platform/src-tauri/target/release/bundle/msi/*.msi + shopt -s nullglob globstar + release_dir="cross-platform/src-tauri/target/release" + bundle_dir="$release_dir/bundle" + installer_candidates=( + "$bundle_dir"/**/*.msi + "$bundle_dir"/**/*.exe ) - if [ ${#src[@]} -eq 0 ]; then - echo "No Windows installer found (expected NSIS .exe or MSI .msi)" - exit 1 + artifact_dir="PinStick-${APP_VERSION}-windows" + mkdir -p "$artifact_dir" + if [ ${#installer_candidates[@]} -gt 0 ]; then + for installer_path in "${installer_candidates[@]}"; do + cp "$installer_path" "$artifact_dir/" + done + else + echo "No installers found under $bundle_dir; printing release directory for debugging." + if [ -d "$release_dir" ]; then + find "$release_dir" -maxdepth 4 -type f | sort + else + echo "Release directory missing: $release_dir" + fi + portable_candidates=( + "$release_dir"/*.exe + ) + if [ ${#portable_candidates[@]} -eq 0 ]; then + echo "No Windows installer or portable .exe artifacts found under $release_dir" + exit 1 + fi + for portable_path in "${portable_candidates[@]}"; do + cp "$portable_path" "$artifact_dir/" + done fi - installer_path="${src[0]}" - installer_ext="${installer_path##*.}" - installer_name="PinStick-${APP_VERSION}-windows.${installer_ext}" - cp "$installer_path" "$installer_name" - printf "WINDOWS_INSTALLER=%s\n" "$installer_name" >> "$GITHUB_ENV" + printf "WINDOWS_ARTIFACT_DIR=%s\n" "$artifact_dir" >> "$GITHUB_ENV" - name: Collect Linux AppImage if: matrix.os == 'ubuntu-22.04' @@ -124,7 +158,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: PinStick-windows - path: ${{ env.WINDOWS_INSTALLER }} + path: ${{ env.WINDOWS_ARTIFACT_DIR }} if-no-files-found: error - name: Upload Linux artifact diff --git a/cross-platform/src-tauri/tauri.conf.json b/cross-platform/src-tauri/tauri.conf.json index 2c482b8..e9c83e0 100644 --- a/cross-platform/src-tauri/tauri.conf.json +++ b/cross-platform/src-tauri/tauri.conf.json @@ -14,7 +14,8 @@ "active": true, "identifier": "slf.pinstick", "icon": [ - "icons/icon.png" + "icons/icon.png", + "icons/icon.ico" ] }, "windows": [ From 7fe615f6315e89d97b9a03e1acd7ff78736d5061 Mon Sep 17 00:00:00 2001 From: Kiya Rose Ren-Miyakari Date: Sun, 29 Mar 2026 20:17:13 -0400 Subject: [PATCH 2/4] Use npx tauri build in CI and enable global Tauri API --- .github/workflows/build-and-release.yml | 6 +++--- .github/workflows/prerelease.yml | 6 +++--- cross-platform/src-tauri/tauri.conf.json | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 2a59b05..a8a35a5 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -66,13 +66,13 @@ jobs: run: | case "${{ matrix.os }}" in windows-2022) - npm run tauri -- build --bundles nsis,msi --verbose + npx tauri build --bundles nsis,msi --verbose ;; ubuntu-22.04) - npm run tauri -- build --bundles appimage --verbose + npx tauri build --bundles appimage --verbose ;; macos-14) - npm run tauri -- build --bundles app --verbose + npx tauri build --bundles app --verbose ;; *) echo "Unsupported runner: ${{ matrix.os }}" diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 3bdfb90..103deaf 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -73,13 +73,13 @@ jobs: run: | case "${{ matrix.os }}" in windows-2022) - npm run tauri -- build --bundles nsis,msi --verbose + npx tauri build --bundles nsis,msi --verbose ;; ubuntu-22.04) - npm run tauri -- build --bundles appimage --verbose + npx tauri build --bundles appimage --verbose ;; macos-14) - npm run tauri -- build --bundles app --verbose + npx tauri build --bundles app --verbose ;; *) echo "Unsupported runner: ${{ matrix.os }}" diff --git a/cross-platform/src-tauri/tauri.conf.json b/cross-platform/src-tauri/tauri.conf.json index e9c83e0..4b5d10d 100644 --- a/cross-platform/src-tauri/tauri.conf.json +++ b/cross-platform/src-tauri/tauri.conf.json @@ -2,6 +2,7 @@ "build": { "beforeBuildCommand": "", "beforeDevCommand": "", + "withGlobalTauri": true, "devPath": "../src", "distDir": "../src" }, From f2250cc0145f3fc7aa4af2d0be5651c700ac7e20 Mon Sep 17 00:00:00 2001 From: Kiya Rose Ren-Miyakari Date: Sun, 29 Mar 2026 20:30:02 -0400 Subject: [PATCH 3/4] Name Windows artifacts as install MSI and portable EXE --- .github/workflows/build-and-release.yml | 27 +++++++++---------------- .github/workflows/prerelease.yml | 27 +++++++++---------------- 2 files changed, 18 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index a8a35a5..0236b2b 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -97,34 +97,25 @@ jobs: shopt -s nullglob globstar release_dir="cross-platform/src-tauri/target/release" bundle_dir="$release_dir/bundle" - installer_candidates=( + msi_candidates=( "$bundle_dir"/**/*.msi - "$bundle_dir"/**/*.exe + ) + portable_candidates=( + "$release_dir"/*.exe ) artifact_dir="PinStick-${APP_VERSION}-windows" mkdir -p "$artifact_dir" - if [ ${#installer_candidates[@]} -gt 0 ]; then - for installer_path in "${installer_candidates[@]}"; do - cp "$installer_path" "$artifact_dir/" - done - else - echo "No installers found under $bundle_dir; printing release directory for debugging." + 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 - portable_candidates=( - "$release_dir"/*.exe - ) - if [ ${#portable_candidates[@]} -eq 0 ]; then - echo "No Windows installer or portable .exe artifacts found under $release_dir" - exit 1 - fi - for portable_path in "${portable_candidates[@]}"; do - cp "$portable_path" "$artifact_dir/" - done + 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 diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 103deaf..2f7c884 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -104,34 +104,25 @@ jobs: shopt -s nullglob globstar release_dir="cross-platform/src-tauri/target/release" bundle_dir="$release_dir/bundle" - installer_candidates=( + msi_candidates=( "$bundle_dir"/**/*.msi - "$bundle_dir"/**/*.exe + ) + portable_candidates=( + "$release_dir"/*.exe ) artifact_dir="PinStick-${APP_VERSION}-windows" mkdir -p "$artifact_dir" - if [ ${#installer_candidates[@]} -gt 0 ]; then - for installer_path in "${installer_candidates[@]}"; do - cp "$installer_path" "$artifact_dir/" - done - else - echo "No installers found under $bundle_dir; printing release directory for debugging." + 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 - portable_candidates=( - "$release_dir"/*.exe - ) - if [ ${#portable_candidates[@]} -eq 0 ]; then - echo "No Windows installer or portable .exe artifacts found under $release_dir" - exit 1 - fi - for portable_path in "${portable_candidates[@]}"; do - cp "$portable_path" "$artifact_dir/" - done + 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 From ad0f90b8b63f47d494a3ec5df929b21072e600cf Mon Sep 17 00:00:00 2001 From: Kiya Rose Ren-Miyakari Date: Sun, 29 Mar 2026 20:31:03 -0400 Subject: [PATCH 4/4] Update .github/workflows/prerelease.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/prerelease.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 2f7c884..80f6b97 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -71,18 +71,18 @@ jobs: working-directory: cross-platform shell: bash run: | - case "${{ matrix.os }}" in - windows-2022) - npx tauri build --bundles nsis,msi --verbose + case "${{ runner.os }}" in + Windows) + npm run tauri -- build --bundles nsis,msi --verbose ;; - ubuntu-22.04) - npx tauri build --bundles appimage --verbose + Linux) + npm run tauri -- build --bundles appimage --verbose ;; - macos-14) - npx tauri build --bundles app --verbose + macOS) + npm run tauri -- build --bundles app --verbose ;; *) - echo "Unsupported runner: ${{ matrix.os }}" + echo "Unsupported runner OS: ${{ runner.os }}" exit 1 ;; esac