mirror of https://github.com/2dust/v2rayN
update build
parent
25fddc3c71
commit
8ee00907b7
|
@ -0,0 +1,32 @@
|
|||
name: release Linux
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
configuration: [Release]
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build
|
||||
run: cd v2rayN &&
|
||||
./build-linux.sh
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: v2rayN-linux
|
||||
path: |
|
||||
./v2rayN/v2rayN-linux.zip
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
name: release macos
|
||||
name: release macOS
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
name: release
|
||||
name: release Windows
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -35,18 +35,7 @@ jobs:
|
|||
name: v2rayN-windows-arm64
|
||||
path: |
|
||||
./v2rayN/v2rayN-windows-arm64.zip
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: v2rayN-linux-64
|
||||
path: |
|
||||
./v2rayN/v2rayN-linux-64.zip
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: v2rayN-linux-arm64
|
||||
path: |
|
||||
./v2rayN/v2rayN-linux-arm64.zip
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo 'Building Linux'
|
||||
|
||||
OutputPath='./bin/v2rayN'
|
||||
OutputPath64="${OutputPath}/linux-x64"
|
||||
OutputPathArm64="${OutputPath}/linux-arm64"
|
||||
|
||||
dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r linux-x64 --self-contained true -p:PublishReadyToRun=false -p:PublishSingleFile=true -o $OutputPath64
|
||||
dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r linux-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-linux.zip $OutputPath
|
||||
exit 0
|
|
@ -1,17 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo 'Building'
|
||||
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 "${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 $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 "$OutputPath/osx-x64/*.pdb"
|
||||
rm -rf "$OutputPath/osx-arm64/*.pdb"
|
||||
rm -rf "$OutputPath64/*.pdb"
|
||||
rm -rf "$OutputPathArm64/*.pdb"
|
||||
|
||||
echo 'Build done'
|
||||
|
||||
ls $OutputPath
|
||||
7z a v2rayN-osx.zip $OutputPath
|
||||
exit 0
|
||||
|
|
|
@ -4,11 +4,9 @@ param (
|
|||
[string]
|
||||
$OutputPathWin64 = './bin/v2rayN/win-x64',
|
||||
$OutputPathWinArm64 = './bin/v2rayN/win-arm64',
|
||||
$OutputPathLinux64 = './bin/v2rayN/linux-x64',
|
||||
$OutputPathLinuxArm64 = './bin/v2rayN/linux-arm64'
|
||||
)
|
||||
|
||||
Write-Host 'Building'
|
||||
Write-Host 'Building Windows'
|
||||
|
||||
dotnet publish `
|
||||
./v2rayN/v2rayN.csproj `
|
||||
|
@ -28,25 +26,6 @@ dotnet publish `
|
|||
-p:PublishSingleFile=true `
|
||||
-o $OutputPathWinArm64
|
||||
|
||||
dotnet publish `
|
||||
./v2rayN.Desktop/v2rayN.Desktop.csproj `
|
||||
-c Release `
|
||||
-r linux-x64 `
|
||||
--self-contained true `
|
||||
-p:PublishReadyToRun=false `
|
||||
-p:PublishSingleFile=true `
|
||||
-o $OutputPathLinux64
|
||||
|
||||
dotnet publish `
|
||||
./v2rayN.Desktop/v2rayN.Desktop.csproj `
|
||||
-c Release `
|
||||
-r linux-arm64 `
|
||||
--self-contained true `
|
||||
-p:PublishReadyToRun=false `
|
||||
-p:PublishSingleFile=true `
|
||||
-o $OutputPathLinuxArm64
|
||||
|
||||
|
||||
if ( -Not $? ) {
|
||||
exit $lastExitCode
|
||||
}
|
||||
|
@ -54,14 +33,10 @@ if ( -Not $? ) {
|
|||
if ( Test-Path -Path ./bin/v2rayN ) {
|
||||
rm -Force "$OutputPathWin64/*.pdb"
|
||||
rm -Force "$OutputPathWinArm64/*.pdb"
|
||||
rm -Force "$OutputPathLinux64/*.pdb"
|
||||
rm -Force "$OutputPathLinuxArm64/*.pdb"
|
||||
}
|
||||
|
||||
Write-Host 'Build done'
|
||||
|
||||
7z a v2rayN-windows-64.zip $OutputPathWin64
|
||||
7z a v2rayN-windows-arm64.zip $OutputPathWinArm64
|
||||
7z a v2rayN-linux-64.zip $OutputPathLinux64
|
||||
7z a v2rayN-linux-arm64.zip $OutputPathLinuxArm64
|
||||
exit 0
|
Loading…
Reference in New Issue