mirror of
				https://github.com/2dust/v2rayN.git
				synced 2025-11-03 05:52:51 +00:00 
			
		
		
		
	
		
			Some checks failed
		
		
	
	
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.1 to 4.6.2. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4.6.1...v4.6.2) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
		
			
				
	
	
		
			71 lines
		
	
	
	
		
			2.4 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			71 lines
		
	
	
	
		
			2.4 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
name: release Windows desktop (Avalonia UI)
 | 
						|
 | 
						|
on:
 | 
						|
  workflow_dispatch:
 | 
						|
    inputs:
 | 
						|
      release_tag:
 | 
						|
        required: false
 | 
						|
        type: string
 | 
						|
  push:
 | 
						|
    branches:
 | 
						|
      - master
 | 
						|
 | 
						|
env:
 | 
						|
  OutputArch: "windows-64"
 | 
						|
  OutputArchArm: "windows-arm64"
 | 
						|
  OutputPath64:  "${{ github.workspace }}/v2rayN/Release/windows-64"
 | 
						|
  OutputPathArm64:  "${{ github.workspace }}/v2rayN/Release/windows-arm64"
 | 
						|
 | 
						|
jobs:
 | 
						|
  build:
 | 
						|
    strategy:
 | 
						|
      matrix:
 | 
						|
        configuration: [Release]
 | 
						|
 | 
						|
    runs-on: ubuntu-latest
 | 
						|
 | 
						|
    steps:
 | 
						|
    - name: Checkout
 | 
						|
      uses: actions/checkout@v4.2.2
 | 
						|
      with:
 | 
						|
        submodules: 'recursive'
 | 
						|
        fetch-depth: '0'
 | 
						|
 | 
						|
    - name: Setup
 | 
						|
      uses: actions/setup-dotnet@v4.3.1
 | 
						|
      with:
 | 
						|
        dotnet-version: '8.0.x'
 | 
						|
 | 
						|
    - name: Build
 | 
						|
      run: |
 | 
						|
        cd v2rayN 
 | 
						|
        dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r win-x64   --self-contained=true -p:EnableWindowsTargeting=true -o $OutputPath64
 | 
						|
        dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r win-arm64 --self-contained=true -p:EnableWindowsTargeting=true -o $OutputPathArm64
 | 
						|
        dotnet publish ./AmazTool/AmazTool.csproj             -c Release -r win-x64   --self-contained=true -p:EnableWindowsTargeting=true -p:PublishTrimmed=true -o $OutputPath64
 | 
						|
        dotnet publish ./AmazTool/AmazTool.csproj             -c Release -r win-arm64 --self-contained=true -p:EnableWindowsTargeting=true -p:PublishTrimmed=true -o $OutputPathArm64        
 | 
						|
 | 
						|
    - name: Upload build artifacts
 | 
						|
      uses: actions/upload-artifact@v4.6.2
 | 
						|
      with:
 | 
						|
        name: v2rayN-windows-desktop
 | 
						|
        path: |
 | 
						|
          ${{ github.workspace }}/v2rayN/Release/windows*          
 | 
						|
 | 
						|
    # release zip archive
 | 
						|
    - name: Package release zip archive
 | 
						|
      if: github.event.inputs.release_tag != ''
 | 
						|
      run: |
 | 
						|
        chmod 755 package-release-zip.sh
 | 
						|
        ./package-release-zip.sh $OutputArch $OutputPath64
 | 
						|
        mv "v2rayN-${OutputArch}.zip" "v2rayN-${OutputArch}-desktop.zip"
 | 
						|
        ./package-release-zip.sh $OutputArchArm $OutputPathArm64
 | 
						|
        mv "v2rayN-${OutputArchArm}.zip" "v2rayN-${OutputArchArm}-desktop.zip"        
 | 
						|
 | 
						|
    - name: Upload zip archive to release
 | 
						|
      uses: svenstaro/upload-release-action@v2
 | 
						|
      if: github.event.inputs.release_tag != ''
 | 
						|
      with:
 | 
						|
        file: ${{ github.workspace }}/v2rayN*.zip
 | 
						|
        tag: ${{ github.event.inputs.release_tag }}
 | 
						|
        file_glob: true
 | 
						|
        prerelease: true
 |