From 552af668fcf329bacab90a3ee12c3f937370ca3d Mon Sep 17 00:00:00 2001 From: Tlntin Date: Sat, 18 Mar 2023 11:51:09 +0800 Subject: [PATCH] update pake-cli.yml --- .github/workflows/pake-cli.yaml | 10 ++++++++++ script/build_with_pake_cli.ps1 | 8 +++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pake-cli.yaml b/.github/workflows/pake-cli.yaml index 38b124a..d70b398 100644 --- a/.github/workflows/pake-cli.yaml +++ b/.github/workflows/pake-cli.yaml @@ -48,6 +48,15 @@ on: required: false type: boolean default: false + targets: + description: "[Targets, Optional, Linux only]" + required: false + default: "deb" + type: choice + options: + - "deb" + - "appimage" + - "all" jobs: @@ -131,6 +140,7 @@ jobs: FULLSCREEN: ${{ inputs.fullscreen }} RESIZE: ${{ inputs.resize }} MULTI_ARCH: ${{ inputs.multi_arch }} + TARGETS: ${{ inputs.targets }} - name: Upload archive uses: actions/upload-artifact@v3 diff --git a/script/build_with_pake_cli.ps1 b/script/build_with_pake_cli.ps1 index bdca696..f48cdcc 100644 --- a/script/build_with_pake_cli.ps1 +++ b/script/build_with_pake_cli.ps1 @@ -18,6 +18,7 @@ Write-Host "transparent: " $env:TRANSPARENT Write-Host "fullscreen: " $env:FULLSCREEN Write-Host "resize: " $env:RESIZE Write-Host "is multi arch? only for Mac: " $env:MULTI_ARCH +Write-Host "targets type? only for Linux: " $env:TARGETS Write-Host "===========================`n" # init params @@ -57,12 +58,17 @@ if ("$env:FULLSCREEN" -eq "true" ) { ${Params}="${Params} --resize" } -# multi-arch +# multi-arch only for mac if (($env:MULTI_ARCH -eq "true") -and ($IsMacOS)) { rustup target add aarch64-apple-darwin ${Params}="${Params} --multi-arch" } +# targets type, only for linux +if (($null -ne $env:TARGETS) -and ($env:TARGETS -ne "") -and ($IsLinux)) { + ${Params}="${Params} --targets $env:TARGETS" +} + Write-Host "Pake parameters is: ${Params}" Write-Host "compile...." Invoke-Expression $Params