From 7375e1a4909c0abb446277a616f4c77abde58aee Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Wed, 25 Dec 2024 16:48:23 +0800 Subject: [PATCH] Modify the build macos script --- .github/workflows/build-osx.yml | 9 ++++++--- v2rayN/build-osx.sh | 18 ------------------ 2 files changed, 6 insertions(+), 21 deletions(-) delete mode 100755 v2rayN/build-osx.sh diff --git a/.github/workflows/build-osx.yml b/.github/workflows/build-osx.yml index b3810656e6..803920d597 100644 --- a/.github/workflows/build-osx.yml +++ b/.github/workflows/build-osx.yml @@ -21,14 +21,17 @@ jobs: - name: Build run: | cd v2rayN - chmod 755 build-osx.sh - ./build-osx.sh + OutputPath='./bin/v2rayN' + OutputPath64="${OutputPath}/osx-x64" + OutputPathArm64="${OutputPath}/osx-arm64" + dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r osx-x64 --self-contained true -p:PublishReadyToRun=false -p:PublishSingleFile=true -o $OutputPath64 + dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r osx-arm64 --self-contained true -p:PublishReadyToRun=false -p:PublishSingleFile=true -o $OutputPathArm64 - name: Upload build artifacts uses: actions/upload-artifact@v4 with: name: v2rayN-osx path: | - ./v2rayN/v2rayN-osx.zip + ./v2rayN/bin/v2rayN \ No newline at end of file diff --git a/v2rayN/build-osx.sh b/v2rayN/build-osx.sh deleted file mode 100755 index 10945cb0da..0000000000 --- a/v2rayN/build-osx.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -echo 'Building macOS' - -OutputPath='./bin/v2rayN' -OutputPath64="${OutputPath}/osx-x64" -OutputPathArm64="${OutputPath}/osx-arm64" - -dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r osx-x64 --self-contained true -p:PublishReadyToRun=false -p:PublishSingleFile=true -o $OutputPath64 -dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r osx-arm64 --self-contained true -p:PublishReadyToRun=false -p:PublishSingleFile=true -o $OutputPathArm64 - -rm -rf "$OutputPath64/*.pdb" -rm -rf "$OutputPathArm64/*.pdb" - -echo 'Build done' - -7z a v2rayN-osx.zip $OutputPath -exit 0