Skip to content

Commit c521a6d

Browse files
committed
feat: add portable windows build to workflow and sync versions
1 parent 3ac55e1 commit c521a6d

2 files changed

Lines changed: 39 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 }}

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "PS Analyzer",
4-
"version": "0.1.41",
4+
"version": "0.1.42",
55
"identifier": "com.lagosproject.ps-analyzer",
66
"build": {
77
"beforeDevCommand": "npm run start",

0 commit comments

Comments
 (0)