Skip to content

Commit 2d9483f

Browse files
committed
Get msi and exe
1 parent 50ae71d commit 2d9483f

1 file changed

Lines changed: 23 additions & 9 deletions

File tree

.github/workflows/release.yaml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,29 @@ jobs:
8888
echo "Artifact paths from tauri action:"
8989
echo "${{ steps.tauri.outputs.artifactPaths }}"
9090
91-
New-Item -ItemType Directory -Path "./binaries" -Force
92-
93-
# find the *.msi and *.exe files and move them into a folder binaries/
94-
# TODO: this seems brittle and maybe we can figure out how to parse the variable above?
95-
$release_dir = "D:\a\overlayed\overlayed\apps\desktop\src-tauri\target\x86_64-pc-windows-msvc\release\"
96-
Get-ChildItem -Path "$release_dir" -File -Recurse | ForEach-Object {
97-
if ($_.Extension -eq ".msi" -or $_.Extension -eq ".exe") {
98-
Move-Item -Path $_.FullName -Destination ./binaries
99-
}
91+
# Parse artifactPaths to extract .exe and .msi files
92+
$artifactPaths = "${{ steps.tauri.outputs.artifactPaths }}"
93+
$paths = $artifactPaths -split ','
94+
95+
# Extract .exe and .msi files (excluding .sig and .zip files)
96+
$exeFiles = $paths | Where-Object { $_ -match '\.exe$' } | Where-Object { $_ -notmatch '\.(sig|zip)$' }
97+
$msiFiles = $paths | Where-Object { $_ -match '\.msi$' } | Where-Object { $_ -notmatch '\.(sig|zip)$' }
98+
99+
Write-Host "Found EXE files:"
100+
$exeFiles | ForEach-Object { Write-Host " $_" }
101+
102+
Write-Host "Found MSI files:"
103+
$msiFiles | ForEach-Object { Write-Host " $_" }
104+
105+
# Move the files to binaries folder
106+
$exeFiles | ForEach-Object {
107+
$fileName = Split-Path $_ -Leaf
108+
Copy-Item $_ -Destination "./binaries/$fileName"
109+
}
110+
111+
$msiFiles | ForEach-Object {
112+
$fileName = Split-Path $_ -Leaf
113+
Copy-Item $_ -Destination "./binaries/$fileName"
100114
}
101115
102116
# sha sum the files in binaries

0 commit comments

Comments
 (0)