diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a3bda16..ab09564 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -114,7 +114,7 @@ jobs: - name: Build Standalone Jar shell: pwsh run: | - ./scripts/Build.ps1 + ./scripts/Build.ps1 -Target all - name: Get Short Commit Id shell: pwsh diff --git a/scripts/Build.ps1 b/scripts/Build.ps1 index d09d0ea..e3774c2 100644 --- a/scripts/Build.ps1 +++ b/scripts/Build.ps1 @@ -1,5 +1,8 @@ #!/usr/bin/env pwsh param( + [ValidateSet('all', 'macos_universal', 'windows_x86', 'windows_aarch64', 'linux_x86')] + [String]$Target, + [Switch]$NativeExecutable, [ValidateSet('app-image', 'exe', 'msi', 'rpm', 'deb', 'pkg', 'dmg')] @@ -30,6 +33,11 @@ if ($PSVersionTable.Platform -eq "Unix") $BuildArgument = @(if($NativeExecutable) { 'jpackage' } else { 'shadowJar' }) +if ($Target) +{ + $BuildArgument += "-Ptarget=$Target" +} + if ($NativeExecutable -and $NativeExecutableType) { $BuildArgument += "-Ptype=$NativeExecutableType"