Skip to content

Commit c83f9d0

Browse files
committed
#25
1 parent 5ff26c7 commit c83f9d0

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

.github/workflows/release.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,79 @@ jobs:
150150
exit 1
151151
}
152152
153+
- name: Collect release files
154+
run: |
155+
echo "🔍 Searching for distributable files..."
156+
# Create release-files directory
157+
mkdir -p release-files
158+
159+
# Copy all distributable files (installers)
160+
find . -type f \( -name "*.exe" -o -name "*.dmg" -o -name "*.AppImage" -o -name "*.zip" -o -name "*.blockmap" \) \
161+
-not -path "*/node_modules/*" \
162+
-not -path "*/win-unpacked/*" \
163+
-not -path "*/linux-unpacked/*" \
164+
-not -path "*/mac-universal/*" \
165+
-exec cp {} release-files/ \;
166+
167+
# Create zip files for unpacked directories
168+
if [ -d "build/win-unpacked" ]; then
169+
echo "📦 Zipping Windows unpacked directory..."
170+
cd build && zip -r ../release-files/ori-launcher-win-unpacked.zip win-unpacked/ && cd ..
171+
fi
172+
173+
if [ -d "build/linux-unpacked" ]; then
174+
echo "📦 Zipping Linux unpacked directory..."
175+
cd build && zip -r ../release-files/ori-launcher-linux-unpacked.zip linux-unpacked/ && cd ..
176+
fi
177+
178+
if [ -d "build/mac-universal" ]; then
179+
echo "📦 Zipping macOS unpacked directory..."
180+
cd build && zip -r ../release-files/ori-launcher-mac-unpacked.zip mac-universal/ && cd ..
181+
fi
182+
183+
echo "📦 All release files collected:"
184+
ls -la release-files/
185+
186+
- name: Collect release files (Windows)
187+
if: matrix.os == 'windows-latest'
188+
shell: pwsh
189+
run: |
190+
Write-Host "🔍 Searching for distributable files..."
191+
# Create release-files directory
192+
New-Item -ItemType Directory -Force -Path "release-files"
193+
194+
# Copy all distributable files (installers)
195+
Get-ChildItem -Recurse -Include "*.exe", "*.dmg", "*.AppImage", "*.zip", "*.blockmap" -Path . |
196+
Where-Object {
197+
$_.FullName -notmatch "node_modules" -and
198+
$_.FullName -notmatch "win-unpacked" -and
199+
$_.FullName -notmatch "linux-unpacked" -and
200+
$_.FullName -notmatch "mac-universal"
201+
} |
202+
ForEach-Object {
203+
Copy-Item $_.FullName -Destination "release-files\"
204+
Write-Host "Copied: $($_.Name)"
205+
}
206+
207+
# Create zip files for unpacked directories
208+
if (Test-Path "build\win-unpacked") {
209+
Write-Host "📦 Zipping Windows unpacked directory..."
210+
Compress-Archive -Path "build\win-unpacked\*" -DestinationPath "release-files\ori-launcher-win-unpacked.zip" -Force
211+
}
212+
213+
if (Test-Path "build\linux-unpacked") {
214+
Write-Host "📦 Zipping Linux unpacked directory..."
215+
Compress-Archive -Path "build\linux-unpacked\*" -DestinationPath "release-files\ori-launcher-linux-unpacked.zip" -Force
216+
}
217+
218+
if (Test-Path "build\mac-universal") {
219+
Write-Host "📦 Zipping macOS unpacked directory..."
220+
Compress-Archive -Path "build\mac-universal\*" -DestinationPath "release-files\ori-launcher-mac-unpacked.zip" -Force
221+
}
222+
223+
Write-Host "📦 All release files collected:"
224+
Get-ChildItem release-files/
225+
153226
- name: List final artifacts (Linux/Mac)
154227
if: matrix.os != 'windows-latest'
155228
run: |

0 commit comments

Comments
 (0)