@@ -121,6 +121,7 @@ jobs:
121121 # --- TAURI BUILD ---
122122
123123 - name : build tauri app
124+ id : tauri_build
124125 uses : tauri-apps/tauri-action@v0
125126 env :
126127 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -131,3 +132,40 @@ jobs:
131132 releaseBody : " Automated release from GitHub Actions. Optimized Linux bundle (no bgzip sidecar)."
132133 releaseDraft : false
133134 prerelease : false
135+
136+ - name : Get Version (from tauri.conf.json)
137+ if : matrix.platform == 'windows-latest'
138+ shell : bash
139+ run : |
140+ VERSION=$(jq -r '.version' src-tauri/tauri.conf.json)
141+ echo "PACKAGE_VERSION=$VERSION" >> $GITHUB_ENV
142+
143+ - name : Package Portable (Windows)
144+ if : matrix.platform == 'windows-latest'
145+ shell : pwsh
146+ run : |
147+ $Version = $env:PACKAGE_VERSION
148+ $PortableDir = "ps-analyzer-v$Version-portable"
149+ New-Item -ItemType Directory -Force -Path $PortableDir
150+
151+ # Copy the main binary
152+ Copy-Item "src-tauri/target/release/ps-analyzer.exe" -Destination "$PortableDir/PS Analyzer.exe"
153+
154+ # Copy all sidecars and DLL dependencies
155+ # We copy the entire binaries folder content to the root of the portable dir
156+ # This ensures the exe can find them if it expects them in the same folder or if Tauri extracts them
157+ Copy-Item "src-tauri/binaries/*" -Destination "$PortableDir/"
158+
159+ # Create the ZIP
160+ Compress-Archive -Path "$PortableDir/*" -DestinationPath "ps-analyzer-v$Version-windows-portable.zip"
161+
162+ echo "Portable ZIP created: ps-analyzer-v$Version-windows-portable.zip"
163+
164+ - name : Upload Portable Zip
165+ if : matrix.platform == 'windows-latest'
166+ uses : softprops/action-gh-release@v2
167+ with :
168+ files : ps-analyzer-*-windows-portable.zip
169+ tag_name : v${{ env.PACKAGE_VERSION }}
170+ env :
171+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments