diff --git a/.github/scripts/Package-Windows.ps1 b/.github/scripts/Package-Windows.ps1 index 0425807b..41588000 100644 --- a/.github/scripts/Package-Windows.ps1 +++ b/.github/scripts/Package-Windows.ps1 @@ -53,6 +53,7 @@ function Package { ErrorAction = 'SilentlyContinue' Path = @( "${ProjectRoot}/release/${ProductName}-*-windows-*.zip" + "${ProjectRoot}/release/${ProductName}-*-windows-*.exe" ) } @@ -67,6 +68,23 @@ function Package { } Compress-Archive -Force @CompressArgs Log-Group + + # Windows Portable Package + Log-Group "Archiving Portable ${ProductName}..." + tree /F "${ProjectRoot}/release/${Configuration}/${ProductName}" + Copy-Item -Path "${ProjectRoot}/release/${Configuration}/${ProductName}/data/locale" -Destination "${ProjectRoot}/release-portable/${Configuration}/data/obs-plugins/${ProductName}/locale" -Recurse + Copy-Item -Path "${ProjectRoot}/release/${Configuration}/${ProductName}/bin" -Destination "${ProjectRoot}/release-portable/${Configuration}/obs-plugins" -Recurse + tree /F "${ProjectRoot}/release-portable/${Configuration}" + + $CompressArgs = @{ + Path = (Get-ChildItem -Path "${ProjectRoot}/release-portable/${Configuration}" -Exclude "${OutputName}*.*") + CompressionLevel = 'Optimal' + DestinationPath = "${ProjectRoot}/release-portable/${OutputName}-portable.zip" + Verbose = ($Env:CI -ne $null) + } + Compress-Archive -Force @CompressArgs + Log-Group + } -Package +Package \ No newline at end of file diff --git a/.github/workflows/build-project.yaml b/.github/workflows/build-project.yaml index a3d4663e..a8bdb084 100644 --- a/.github/workflows/build-project.yaml +++ b/.github/workflows/build-project.yaml @@ -290,8 +290,14 @@ jobs: config: ${{ needs.check-event.outputs.config }} package: ${{ fromJSON(needs.check-event.outputs.package) }} - - name: Upload Artifacts 📡 + - name: Upload Zip Artifacts 📡 uses: actions/upload-artifact@v4 with: name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-windows-x64-${{ needs.check-event.outputs.commitHash }} - path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-windows-x64*.* + path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-windows-x64*.zip + + - name: Upload Portable Zip Artifacts 📡 + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-windows-x64-portable-${{ needs.check-event.outputs.commitHash }} + path: ${{ github.workspace }}/release-portable/${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-windows-x64*.zip \ No newline at end of file diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 8f446693..4c4a0ff9 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -73,6 +73,7 @@ jobs: variants=( 'windows-x64;zip|exe' + 'windows-x64-portable;zip|exe' 'macos-universal;tar.xz|pkg' 'ubuntu-24.04-x86_64;tar.xz|deb|ddeb' 'sources;tar.xz' @@ -116,4 +117,4 @@ jobs: ${{ github.workspace }}/*.pkg ${{ github.workspace }}/*.deb ${{ github.workspace }}/*.ddeb - ${{ github.workspace }}/*.tar.xz + ${{ github.workspace }}/*.tar.xz \ No newline at end of file