Modify the build windows script

This commit is contained in:
2dust
2024-12-25 17:06:03 +08:00
parent 7375e1a490
commit eafa20032b
3 changed files with 39 additions and 83 deletions

39
.github/workflows/build-windows.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: release Windows
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
OutputPath='./bin/v2rayN'
OutputPath64="${OutputPath}/win-x64"
OutputPathArm64="${OutputPath}/win-arm64"
dotnet publish ./v2rayN/v2rayN.csproj -c Release -r win-x64 --self-contained false -p:PublishReadyToRun=false -p:PublishSingleFile=true -p:EnableWindowsTargeting=true -o $OutputPath64
dotnet publish ./v2rayN/v2rayN.csproj -c Release -r win-arm64 --self-contained false -p:PublishReadyToRun=false -p:PublishSingleFile=true -p:EnableWindowsTargeting=true -o $OutputPathArm64
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: v2rayN-windows
path: |
./v2rayN/bin/v2rayN

View File

@@ -1,41 +0,0 @@
name: release Windows
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
strategy:
matrix:
configuration: [Release]
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: cd v2rayN &&
./build.ps1
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: v2rayN-windows-64
path: |
./v2rayN/v2rayN-windows-64.zip
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: v2rayN-windows-arm64
path: |
./v2rayN/v2rayN-windows-arm64.zip