Skip to content

Commit 4e2c565

Browse files
committed
Add portable zip release
1 parent 4e724c9 commit 4e2c565

3 files changed

Lines changed: 22 additions & 0 deletions

File tree

.github/scripts/Package-Windows.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,21 @@ function Package {
7070
Compress-Archive -Force @CompressArgs
7171
Log-Group
7272

73+
Log-Group "Archiving Portable ${ProductName}..."
74+
tree /F "${ProjectRoot}/release/${Configuration}/${ProductName}"
75+
Copy-Item -Path "${ProjectRoot}/release/${Configuration}/${ProductName}/data/locale" -Destination "${ProjectRoot}/release-portable/${Configuration}/data/obs-plugins/${ProductName}/locale" -Recurse
76+
Copy-Item -Path "${ProjectRoot}/release/${Configuration}/${ProductName}/bin" -Destination "${ProjectRoot}/release-portable/${Configuration}/obs-plugins" -Recurse
77+
tree /F "${ProjectRoot}/release-portable/${Configuration}"
78+
79+
$CompressArgs = @{
80+
Path = (Get-ChildItem -Path "${ProjectRoot}/release-portable/${Configuration}" -Exclude "${OutputName}*.*")
81+
CompressionLevel = 'Optimal'
82+
DestinationPath = "${ProjectRoot}/release-portable/${OutputName}-Portable.zip"
83+
Verbose = ($Env:CI -ne $null)
84+
}
85+
Compress-Archive -Force @CompressArgs
86+
Log-Group
87+
7388
if ( ( $BuildInstaller ) ) {
7489
$IsccFile = "${ProjectRoot}/build_${Target}/installer-Windows.generated.iss"
7590

.github/workflows/build-project.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,12 @@ jobs:
296296
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-windows-x64-${{ needs.check-event.outputs.commitHash }}
297297
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-windows-x64*.zip
298298

299+
- name: Upload Portable Zip Artifact 📡
300+
uses: actions/upload-artifact@v4
301+
with:
302+
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-windows-x64-Portable-${{ needs.check-event.outputs.commitHash }}
303+
path: ${{ github.workspace }}/release-portable/${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-windows-x64*.zip
304+
299305
- name: Upload Exe Artifacts 📡
300306
uses: actions/upload-artifact@v4
301307
with:

.github/workflows/push.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ jobs:
7373
7474
variants=(
7575
'windows-x64;zip|exe'
76+
'windows-x64-Portable;zip|exe'
7677
'windows-x64-Installer;zip|exe'
7778
'macos-universal;tar.xz|pkg'
7879
'ubuntu-24.04-x86_64;tar.xz|deb|ddeb'

0 commit comments

Comments
 (0)