update build macos

This commit is contained in:
2dust 2024-12-23 12:12:03 +08:00
parent 247b59985f
commit a57c83125e
2 changed files with 16 additions and 10 deletions

View file

@ -25,8 +25,13 @@ jobs:
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: v2rayN-osx
name: v2rayN-macos-64
path: |
./v2rayN/v2rayN-osx.zip
./v2rayN/v2rayN-macos-64.zip
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: v2rayN-macos-arm64
path: |
./v2rayN/v2rayN-macos-arm64.zip

View file

@ -2,16 +2,17 @@
echo 'Building'
OutputPath='./bin/v2rayN'
OutputPath='./bin/v2rayN/osx-x64'
OutputPathArm64='./bin/v2rayN/osx-arm64'
dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r osx-x64 --self-contained true -p:PublishReadyToRun=false -p:PublishSingleFile=true -o "${OutputPath}/osx-x64"
dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r osx-arm64 --self-contained true -p:PublishReadyToRun=false -p:PublishSingleFile=true -o "${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 $OutputPath
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 "$OutputPath/osx-x64/*.pdb"
rm -rf "$OutputPath/osx-arm64/*.pdb"
rm -rf "$OutputPath/*.pdb"
rm -rf "$OutputPathArm64/*.pdb"
echo 'Build done'
ls $OutputPath
7z a v2rayN-osx.zip $OutputPath
7z a v2rayN-macos-64.zip $OutputPath
7z a v2rayN-macos-arm64.zip $OutputPathArm64
exit 0