Files
v2rayN/.github/workflows/build.yml
T
JieXu d1c9c0b536 Update .NET 10 (#9239)
* Update dotnet to 10

* Update .NET version in build workflow

* Update build-osx.yml

* Update package-zip.yml

* Update package-rhel.sh

* Update print statement from 'Hello' to 'Goodbye'

* Update package-rhel-riscv.sh

* Create package-debian-riscv.sh

* Update build-linux.yml

* Create update-riscv-depand.yml

* Update update-riscv-depand.yml

* Update ServiceLib.csproj

* Update Directory.Packages.props

* Update UpdateService.cs

* Update UpdateService.cs

* Update Directory.Packages.props

* Update ServiceLib.csproj

* Replace SourceGear.sqlite3 with Repobot.SQLite.Unofficial

* Replace SourceGear.sqlite3 with Repobot.SQLite.Unofficial

* Update Repobot.SQLite.Unofficial version to 3.53.1.1

* Update package-zip.yml

* Update build-osx.yml

Adjust sleep duration to reduce race condition likelihood.

* Update Directory.Packages.props

* Update Directory.Packages.props

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: DHR60 <dehongren60@gmail.com>
Co-authored-by: xujie86 <167618598+xujie86@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-11 17:56:35 +08:00

71 lines
1.8 KiB
YAML

name: build
on:
workflow_call:
inputs:
target: # windows linux macos
required: true
type: string
project:
required: false
type: string
default: './v2rayN.Desktop/v2rayN.Desktop.csproj'
jobs:
build:
name: build x64 arm64
strategy:
matrix:
arch: [ x64, arm64 ]
runs-on: |-
${{
case(
inputs.target == 'macos', 'macos-latest',
inputs.target == 'linux', 'ubuntu-24.04',
'ubuntu-latest'
)
}}
env:
Output: "${{ github.workspace }}/${{ matrix.arch }}"
RID: |-
${{
case(
inputs.target == 'macos', format('osx-{0}', matrix.arch),
inputs.target == 'windows', format('win-{0}', matrix.arch),
format('{0}-{1}', inputs.target, matrix.arch)
)
}}
Project: ${{ inputs.project }}
ExtOpt: |-
${{
case(
inputs.target == 'windows', '-p:EnableWindowsTargeting=true',
''
)
}}
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
with:
submodules: 'recursive'
fetch-depth: '0'
- name: Setup .NET
uses: actions/setup-dotnet@v5.2.0
with:
dotnet-version: '10.0.1xx'
- name: Build v2rayN
working-directory: ./v2rayN
run: dotnet publish $Project -c Release -r $RID -p:SelfContained=true $ExtOpt -o $Output
- name: Build AmazTool
working-directory: ./v2rayN
run: dotnet publish ./AmazTool/AmazTool.csproj -c Release -r $RID -p:SelfContained=true -p:PublishTrimmed=true $ExtOpt -o $Output
- name: Upload build artifacts
uses: actions/upload-artifact@v7.0.1
with:
name: ${{ matrix.arch }}
path: ${{ matrix.arch }}