From 8107a8b8a6dae5ef01a8a7dbf57bc34a734a9312 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 30 Nov 2025 18:48:02 +0000 Subject: [PATCH 01/12] Initial plan From ec280a19df1aa5cfce4081cc74e724a6a2c2cff8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 30 Nov 2025 18:51:01 +0000 Subject: [PATCH 02/12] Add GitHub Actions workflows for CI/CD with ARM64 and x64 releases Co-authored-by: hoshiizumiya <63837495+hoshiizumiya@users.noreply.github.com> --- .github/workflows/ci.yml | 81 ++++++++++++++++++++++ .github/workflows/release.yml | 122 ++++++++++++++++++++++++++++++++++ 2 files changed, 203 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9fcf2a1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,81 @@ +name: CI Build + +on: + push: + branches: + - main + - dev_master + paths-ignore: + - '**.md' + - 'LICENSE.txt' + pull_request: + branches: + - main + - dev_master + paths-ignore: + - '**.md' + - 'LICENSE.txt' + +env: + VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" + +jobs: + build: + strategy: + matrix: + platform: [x64, ARM64] + configuration: [Release] + fail-fast: false + + runs-on: windows-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Setup NuGet + uses: nuget/setup-nuget@v2 + + - name: Export GitHub Actions cache environment variables + uses: actions/github-script@v7 + with: + script: | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); + + - name: Setup vcpkg + uses: lukka/run-vcpkg@v11 + with: + vcpkgDirectory: '${{ github.workspace }}/vcpkg' + vcpkgGitCommitId: 'c82f74667287d3dc386bce81e44964370c91a289' + runVcpkgInstall: false + + - name: Restore NuGet packages + run: nuget restore OpenNet.sln + + - name: Install vcpkg dependencies + run: | + $triplet = if ("${{ matrix.platform }}" -eq "ARM64") { "arm64-windows" } else { "x64-windows" } + cd OpenNet + ${{ github.workspace }}/vcpkg/vcpkg install --triplet $triplet + shell: pwsh + + - name: Build solution + run: | + msbuild OpenNet.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /p:AppxBundlePlatforms="${{ matrix.platform }}" /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=SideloadOnly /m + shell: pwsh + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: OpenNet-${{ matrix.platform }}-${{ matrix.configuration }} + path: | + OpenNet/${{ matrix.platform }}/${{ matrix.configuration }}/ + !**/*.pdb + !**/*.ilk + retention-days: 7 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5881e9f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,122 @@ +name: Release + +on: + push: + tags: + - 'v*' + - 'V*' + +env: + VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" + +jobs: + build: + strategy: + matrix: + platform: [x64, ARM64] + configuration: [Release] + fail-fast: false + + runs-on: windows-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Setup NuGet + uses: nuget/setup-nuget@v2 + + - name: Export GitHub Actions cache environment variables + uses: actions/github-script@v7 + with: + script: | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); + + - name: Setup vcpkg + uses: lukka/run-vcpkg@v11 + with: + vcpkgDirectory: '${{ github.workspace }}/vcpkg' + vcpkgGitCommitId: 'c82f74667287d3dc386bce81e44964370c91a289' + runVcpkgInstall: false + + - name: Restore NuGet packages + run: nuget restore OpenNet.sln + + - name: Install vcpkg dependencies + run: | + $triplet = if ("${{ matrix.platform }}" -eq "ARM64") { "arm64-windows" } else { "x64-windows" } + cd OpenNet + ${{ github.workspace }}/vcpkg/vcpkg install --triplet $triplet + shell: pwsh + + - name: Build solution + run: | + msbuild OpenNet.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /p:AppxBundlePlatforms="${{ matrix.platform }}" /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=SideloadOnly /m + shell: pwsh + + - name: Create release package + run: | + $outputDir = "OpenNet/${{ matrix.platform }}/${{ matrix.configuration }}" + $packageName = "OpenNet_${{ matrix.platform }}" + + # Create a clean directory for release files + New-Item -ItemType Directory -Force -Path "release-${{ matrix.platform }}" + + # Copy AppX packages if they exist + if (Test-Path "$outputDir/AppX") { + Copy-Item -Path "$outputDir/AppX/*" -Destination "release-${{ matrix.platform }}/" -Recurse + } + + # Also copy loose files (exe, dll, etc.) if AppX doesn't exist + if (Test-Path "$outputDir/OpenNet.exe") { + Get-ChildItem -Path $outputDir -Include *.exe,*.dll,*.pri,*.winmd -Recurse | + Where-Object { $_.FullName -notlike "*vcpkg_installed*" } | + Copy-Item -Destination "release-${{ matrix.platform }}/" -Force + } + + # Create zip archive + Compress-Archive -Path "release-${{ matrix.platform }}/*" -DestinationPath "${packageName}.zip" -Force + shell: pwsh + + - name: Upload release artifact + uses: actions/upload-artifact@v4 + with: + name: OpenNet_${{ matrix.platform }} + path: OpenNet_${{ matrix.platform }}.zip + retention-days: 1 + + release: + needs: build + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Download x64 artifact + uses: actions/download-artifact@v4 + with: + name: OpenNet_x64 + path: ./artifacts + + - name: Download ARM64 artifact + uses: actions/download-artifact@v4 + with: + name: OpenNet_ARM64 + path: ./artifacts + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + files: | + ./artifacts/OpenNet_x64.zip + ./artifacts/OpenNet_ARM64.zip + draft: false + prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') || contains(github.ref_name, 'rc') }} + generate_release_notes: true + token: ${{ secrets.GITHUB_TOKEN }} From 4484cebff5f5250abb7dd4c61bd6fe3e062fd75a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 30 Nov 2025 18:52:09 +0000 Subject: [PATCH 03/12] Address code review: update vcpkg commit ID and artifact retention Co-authored-by: hoshiizumiya <63837495+hoshiizumiya@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9fcf2a1..4dfba71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: uses: lukka/run-vcpkg@v11 with: vcpkgDirectory: '${{ github.workspace }}/vcpkg' - vcpkgGitCommitId: 'c82f74667287d3dc386bce81e44964370c91a289' + vcpkgGitCommitId: '4f8fe05871555c1798dbcb1957d0d595e94f7b57' runVcpkgInstall: false - name: Restore NuGet packages diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5881e9f..e5df24e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,7 +42,7 @@ jobs: uses: lukka/run-vcpkg@v11 with: vcpkgDirectory: '${{ github.workspace }}/vcpkg' - vcpkgGitCommitId: 'c82f74667287d3dc386bce81e44964370c91a289' + vcpkgGitCommitId: '4f8fe05871555c1798dbcb1957d0d595e94f7b57' runVcpkgInstall: false - name: Restore NuGet packages @@ -89,7 +89,7 @@ jobs: with: name: OpenNet_${{ matrix.platform }} path: OpenNet_${{ matrix.platform }}.zip - retention-days: 1 + retention-days: 7 release: needs: build From e8434c4dff168f853aca83e440076fc735ab33bf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 30 Nov 2025 18:53:40 +0000 Subject: [PATCH 04/12] Add explicit permissions to workflows for security Co-authored-by: hoshiizumiya <63837495+hoshiizumiya@users.noreply.github.com> --- .github/workflows/ci.yml | 2 ++ .github/workflows/release.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4dfba71..5dfd54b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,8 @@ jobs: fail-fast: false runs-on: windows-latest + permissions: + contents: read steps: - name: Checkout repository diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e5df24e..8ed4386 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,8 @@ jobs: fail-fast: false runs-on: windows-latest + permissions: + contents: read steps: - name: Checkout repository From 45e6ed6c4786a7ce6c603eef552501f3d925e60b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 30 Nov 2025 19:44:37 +0000 Subject: [PATCH 05/12] Fix build errors: add .NET 10.0 SDK and use v143 platform toolset Co-authored-by: hoshiizumiya <63837495+hoshiizumiya@users.noreply.github.com> --- .github/workflows/ci.yml | 8 +++++++- .github/workflows/release.yml | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5dfd54b..8f1fcd2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,12 @@ jobs: with: submodules: recursive + - name: Setup .NET 10.0 Preview + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '10.0.x' + dotnet-quality: 'preview' + - name: Setup MSBuild uses: microsoft/setup-msbuild@v2 @@ -69,7 +75,7 @@ jobs: - name: Build solution run: | - msbuild OpenNet.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /p:AppxBundlePlatforms="${{ matrix.platform }}" /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=SideloadOnly /m + msbuild OpenNet.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /p:PlatformToolset=v143 /p:AppxBundlePlatforms="${{ matrix.platform }}" /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=SideloadOnly /m shell: pwsh - name: Upload build artifacts diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8ed4386..1a22a32 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,6 +27,12 @@ jobs: with: submodules: recursive + - name: Setup .NET 10.0 Preview + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '10.0.x' + dotnet-quality: 'preview' + - name: Setup MSBuild uses: microsoft/setup-msbuild@v2 @@ -59,7 +65,7 @@ jobs: - name: Build solution run: | - msbuild OpenNet.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /p:AppxBundlePlatforms="${{ matrix.platform }}" /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=SideloadOnly /m + msbuild OpenNet.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /p:PlatformToolset=v143 /p:AppxBundlePlatforms="${{ matrix.platform }}" /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=SideloadOnly /m shell: pwsh - name: Create release package From 8a87218b0327158c096751dbb0028722d2f61d05 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 1 Dec 2025 01:10:39 +0000 Subject: [PATCH 06/12] Fix build errors: remove ARM64, add vcpkg integrate, fix libtorrent linking Co-authored-by: hoshiizumiya <63837495+hoshiizumiya@users.noreply.github.com> --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/release.yml | 15 ++++----------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f1fcd2..72b8866 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: build: strategy: matrix: - platform: [x64, ARM64] + platform: [x64] configuration: [Release] fail-fast: false @@ -68,14 +68,14 @@ jobs: - name: Install vcpkg dependencies run: | - $triplet = if ("${{ matrix.platform }}" -eq "ARM64") { "arm64-windows" } else { "x64-windows" } cd OpenNet - ${{ github.workspace }}/vcpkg/vcpkg install --triplet $triplet + ${{ github.workspace }}/vcpkg/vcpkg install --triplet x64-windows + ${{ github.workspace }}/vcpkg/vcpkg integrate install shell: pwsh - name: Build solution run: | - msbuild OpenNet.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /p:PlatformToolset=v143 /p:AppxBundlePlatforms="${{ matrix.platform }}" /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=SideloadOnly /m + msbuild OpenNet.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /p:PlatformToolset=v143 /p:AppxBundlePlatforms="${{ matrix.platform }}" /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=SideloadOnly /p:VcpkgEnableManifest=true /p:VcpkgManifestInstall=false /m shell: pwsh - name: Upload build artifacts diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1a22a32..2f6516f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ jobs: build: strategy: matrix: - platform: [x64, ARM64] + platform: [x64] configuration: [Release] fail-fast: false @@ -58,14 +58,14 @@ jobs: - name: Install vcpkg dependencies run: | - $triplet = if ("${{ matrix.platform }}" -eq "ARM64") { "arm64-windows" } else { "x64-windows" } cd OpenNet - ${{ github.workspace }}/vcpkg/vcpkg install --triplet $triplet + ${{ github.workspace }}/vcpkg/vcpkg install --triplet x64-windows + ${{ github.workspace }}/vcpkg/vcpkg integrate install shell: pwsh - name: Build solution run: | - msbuild OpenNet.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /p:PlatformToolset=v143 /p:AppxBundlePlatforms="${{ matrix.platform }}" /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=SideloadOnly /m + msbuild OpenNet.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /p:PlatformToolset=v143 /p:AppxBundlePlatforms="${{ matrix.platform }}" /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=SideloadOnly /p:VcpkgEnableManifest=true /p:VcpkgManifestInstall=false /m shell: pwsh - name: Create release package @@ -112,18 +112,11 @@ jobs: name: OpenNet_x64 path: ./artifacts - - name: Download ARM64 artifact - uses: actions/download-artifact@v4 - with: - name: OpenNet_ARM64 - path: ./artifacts - - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: files: | ./artifacts/OpenNet_x64.zip - ./artifacts/OpenNet_ARM64.zip draft: false prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') || contains(github.ref_name, 'rc') }} generate_release_notes: true From 3263c2f7998a71b6067289e205e4b517b8ec7a91 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 1 Dec 2025 01:19:35 +0000 Subject: [PATCH 07/12] Build both x64 and ARM64 from single x64 runner, use 7z compression for release Co-authored-by: hoshiizumiya <63837495+hoshiizumiya@users.noreply.github.com> --- .github/workflows/ci.yml | 34 +++++++---- .github/workflows/release.yml | 108 ++++++++++++++++++++++++++-------- 2 files changed, 107 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72b8866..842bf2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,12 +21,6 @@ env: jobs: build: - strategy: - matrix: - platform: [x64] - configuration: [Release] - fail-fast: false - runs-on: windows-latest permissions: contents: read @@ -66,24 +60,40 @@ jobs: - name: Restore NuGet packages run: nuget restore OpenNet.sln - - name: Install vcpkg dependencies + - name: Install vcpkg dependencies for x64 and ARM64 run: | cd OpenNet ${{ github.workspace }}/vcpkg/vcpkg install --triplet x64-windows + ${{ github.workspace }}/vcpkg/vcpkg install --triplet arm64-windows ${{ github.workspace }}/vcpkg/vcpkg integrate install shell: pwsh - - name: Build solution + - name: Build x64 Release run: | - msbuild OpenNet.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /p:PlatformToolset=v143 /p:AppxBundlePlatforms="${{ matrix.platform }}" /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=SideloadOnly /p:VcpkgEnableManifest=true /p:VcpkgManifestInstall=false /m + msbuild OpenNet.sln /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=v143 /p:AppxBundlePlatforms="x64" /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=SideloadOnly /p:VcpkgEnableManifest=true /p:VcpkgManifestInstall=false /m shell: pwsh - - name: Upload build artifacts + - name: Build ARM64 Release + run: | + msbuild OpenNet.sln /p:Configuration=Release /p:Platform=ARM64 /p:PlatformToolset=v143 /p:AppxBundlePlatforms="ARM64" /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=SideloadOnly /p:VcpkgEnableManifest=true /p:VcpkgManifestInstall=false /m + shell: pwsh + + - name: Upload x64 build artifacts + uses: actions/upload-artifact@v4 + with: + name: OpenNet-x64-Release + path: | + OpenNet/x64/Release/ + !**/*.pdb + !**/*.ilk + retention-days: 7 + + - name: Upload ARM64 build artifacts uses: actions/upload-artifact@v4 with: - name: OpenNet-${{ matrix.platform }}-${{ matrix.configuration }} + name: OpenNet-ARM64-Release path: | - OpenNet/${{ matrix.platform }}/${{ matrix.configuration }}/ + OpenNet/ARM64/Release/ !**/*.pdb !**/*.ilk retention-days: 7 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2f6516f..84c0ecf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,12 +11,6 @@ env: jobs: build: - strategy: - matrix: - platform: [x64] - configuration: [Release] - fail-fast: false - runs-on: windows-latest permissions: contents: read @@ -56,47 +50,108 @@ jobs: - name: Restore NuGet packages run: nuget restore OpenNet.sln - - name: Install vcpkg dependencies + - name: Install vcpkg dependencies for x64 and ARM64 run: | cd OpenNet ${{ github.workspace }}/vcpkg/vcpkg install --triplet x64-windows + ${{ github.workspace }}/vcpkg/vcpkg install --triplet arm64-windows ${{ github.workspace }}/vcpkg/vcpkg integrate install shell: pwsh - - name: Build solution + - name: Build x64 Release run: | - msbuild OpenNet.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /p:PlatformToolset=v143 /p:AppxBundlePlatforms="${{ matrix.platform }}" /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=SideloadOnly /p:VcpkgEnableManifest=true /p:VcpkgManifestInstall=false /m + msbuild OpenNet.sln /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=v143 /p:AppxBundlePlatforms="x64" /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=SideloadOnly /p:VcpkgEnableManifest=true /p:VcpkgManifestInstall=false /m shell: pwsh - - name: Create release package + - name: Build ARM64 Release run: | - $outputDir = "OpenNet/${{ matrix.platform }}/${{ matrix.configuration }}" - $packageName = "OpenNet_${{ matrix.platform }}" + msbuild OpenNet.sln /p:Configuration=Release /p:Platform=ARM64 /p:PlatformToolset=v143 /p:AppxBundlePlatforms="ARM64" /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=SideloadOnly /p:VcpkgEnableManifest=true /p:VcpkgManifestInstall=false /m + shell: pwsh + + - name: Create x64 release package with 7z + run: | + $outputDir = "OpenNet/x64/Release" + $packageName = "OpenNet_x64" # Create a clean directory for release files - New-Item -ItemType Directory -Force -Path "release-${{ matrix.platform }}" + New-Item -ItemType Directory -Force -Path "release-x64" - # Copy AppX packages if they exist + # Copy AppX/MSIX packages if they exist + $appxPath = Get-ChildItem -Path $outputDir -Filter "*.msix" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1 + if ($appxPath) { + Copy-Item -Path $appxPath.FullName -Destination "release-x64/" -Force + } + + # Copy AppPackages folder if exists (MSIX sideload packages) + if (Test-Path "OpenNet/AppPackages") { + Get-ChildItem -Path "OpenNet/AppPackages" -Filter "*x64*" -Recurse | + Copy-Item -Destination "release-x64/" -Force -Recurse + } + + # Copy AppX folder if exists if (Test-Path "$outputDir/AppX") { - Copy-Item -Path "$outputDir/AppX/*" -Destination "release-${{ matrix.platform }}/" -Recurse + Copy-Item -Path "$outputDir/AppX/*" -Destination "release-x64/" -Recurse -Force } - # Also copy loose files (exe, dll, etc.) if AppX doesn't exist + # Also copy loose files (exe, dll, etc.) as fallback if (Test-Path "$outputDir/OpenNet.exe") { Get-ChildItem -Path $outputDir -Include *.exe,*.dll,*.pri,*.winmd -Recurse | Where-Object { $_.FullName -notlike "*vcpkg_installed*" } | - Copy-Item -Destination "release-${{ matrix.platform }}/" -Force + Copy-Item -Destination "release-x64/" -Force } - # Create zip archive - Compress-Archive -Path "release-${{ matrix.platform }}/*" -DestinationPath "${packageName}.zip" -Force + # Compress with 7z + 7z a -t7z "${packageName}.7z" "./release-x64/*" shell: pwsh - - name: Upload release artifact + - name: Create ARM64 release package with 7z + run: | + $outputDir = "OpenNet/ARM64/Release" + $packageName = "OpenNet_ARM64" + + # Create a clean directory for release files + New-Item -ItemType Directory -Force -Path "release-ARM64" + + # Copy AppX/MSIX packages if they exist + $appxPath = Get-ChildItem -Path $outputDir -Filter "*.msix" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1 + if ($appxPath) { + Copy-Item -Path $appxPath.FullName -Destination "release-ARM64/" -Force + } + + # Copy AppPackages folder if exists (MSIX sideload packages) + if (Test-Path "OpenNet/AppPackages") { + Get-ChildItem -Path "OpenNet/AppPackages" -Filter "*ARM64*" -Recurse | + Copy-Item -Destination "release-ARM64/" -Force -Recurse + } + + # Copy AppX folder if exists + if (Test-Path "$outputDir/AppX") { + Copy-Item -Path "$outputDir/AppX/*" -Destination "release-ARM64/" -Recurse -Force + } + + # Also copy loose files (exe, dll, etc.) as fallback + if (Test-Path "$outputDir/OpenNet.exe") { + Get-ChildItem -Path $outputDir -Include *.exe,*.dll,*.pri,*.winmd -Recurse | + Where-Object { $_.FullName -notlike "*vcpkg_installed*" } | + Copy-Item -Destination "release-ARM64/" -Force + } + + # Compress with 7z + 7z a -t7z "${packageName}.7z" "./release-ARM64/*" + shell: pwsh + + - name: Upload x64 release artifact uses: actions/upload-artifact@v4 with: - name: OpenNet_${{ matrix.platform }} - path: OpenNet_${{ matrix.platform }}.zip + name: OpenNet_x64 + path: OpenNet_x64.7z + retention-days: 7 + + - name: Upload ARM64 release artifact + uses: actions/upload-artifact@v4 + with: + name: OpenNet_ARM64 + path: OpenNet_ARM64.7z retention-days: 7 release: @@ -112,11 +167,18 @@ jobs: name: OpenNet_x64 path: ./artifacts + - name: Download ARM64 artifact + uses: actions/download-artifact@v4 + with: + name: OpenNet_ARM64 + path: ./artifacts + - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: files: | - ./artifacts/OpenNet_x64.zip + ./artifacts/OpenNet_x64.7z + ./artifacts/OpenNet_ARM64.7z draft: false prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') || contains(github.ref_name, 'rc') }} generate_release_notes: true From 4db7c92ec8c5f88c1c47221cada172865c6b444c Mon Sep 17 00:00:00 2001 From: hoshiizumiya <63837495+hoshiizumiya@users.noreply.github.com> Date: Mon, 8 Dec 2025 09:33:06 +0800 Subject: [PATCH 08/12] Upgrade and fix some GitHub Actions --- .github/workflows/ci.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 842bf2b..ca1ca9d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,15 +27,14 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: submodules: recursive - - name: Setup .NET 10.0 Preview - uses: actions/setup-dotnet@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v5 with: dotnet-version: '10.0.x' - dotnet-quality: 'preview' - name: Setup MSBuild uses: microsoft/setup-msbuild@v2 @@ -58,7 +57,7 @@ jobs: runVcpkgInstall: false - name: Restore NuGet packages - run: nuget restore OpenNet.sln + run: nuget restore OpenNet.slnx - name: Install vcpkg dependencies for x64 and ARM64 run: | @@ -70,12 +69,12 @@ jobs: - name: Build x64 Release run: | - msbuild OpenNet.sln /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=v143 /p:AppxBundlePlatforms="x64" /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=SideloadOnly /p:VcpkgEnableManifest=true /p:VcpkgManifestInstall=false /m + msbuild OpenNet.slnx /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=v143 /p:AppxBundlePlatforms="x64" /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=SideloadOnly /p:VcpkgEnableManifest=true /p:VcpkgManifestInstall=false /m shell: pwsh - name: Build ARM64 Release run: | - msbuild OpenNet.sln /p:Configuration=Release /p:Platform=ARM64 /p:PlatformToolset=v143 /p:AppxBundlePlatforms="ARM64" /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=SideloadOnly /p:VcpkgEnableManifest=true /p:VcpkgManifestInstall=false /m + msbuild OpenNet.slnx /p:Configuration=Release /p:Platform=ARM64 /p:PlatformToolset=v143 /p:AppxBundlePlatforms="ARM64" /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=SideloadOnly /p:VcpkgEnableManifest=true /p:VcpkgManifestInstall=false /m shell: pwsh - name: Upload x64 build artifacts From 1dc511754eeba53739452bc62029ddefe1779599 Mon Sep 17 00:00:00 2001 From: hoshiizumiya <63837495+hoshiizumiya@users.noreply.github.com> Date: Wed, 24 Dec 2025 17:40:09 +0800 Subject: [PATCH 09/12] fix: CI workflow --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca1ca9d..a4fe824 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,10 @@ on: env: VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" - + +permissions: + packages: write + jobs: build: runs-on: windows-latest @@ -53,17 +56,14 @@ jobs: uses: lukka/run-vcpkg@v11 with: vcpkgDirectory: '${{ github.workspace }}/vcpkg' - vcpkgGitCommitId: '4f8fe05871555c1798dbcb1957d0d595e94f7b57' runVcpkgInstall: false - name: Restore NuGet packages run: nuget restore OpenNet.slnx - - name: Install vcpkg dependencies for x64 and ARM64 + - name: Install vcpkg dependencies for VS run: | cd OpenNet - ${{ github.workspace }}/vcpkg/vcpkg install --triplet x64-windows - ${{ github.workspace }}/vcpkg/vcpkg install --triplet arm64-windows ${{ github.workspace }}/vcpkg/vcpkg integrate install shell: pwsh From a93c50a71ff9a39afc4c7e2696d5bf1068f85f64 Mon Sep 17 00:00:00 2001 From: hoshiizumiya <63837495+hoshiizumiya@users.noreply.github.com> Date: Wed, 24 Dec 2025 18:11:49 +0800 Subject: [PATCH 10/12] fix: CI workflow --- .github/workflows/ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4fe824..9e88640 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,9 +62,7 @@ jobs: run: nuget restore OpenNet.slnx - name: Install vcpkg dependencies for VS - run: | - cd OpenNet - ${{ github.workspace }}/vcpkg/vcpkg integrate install + run: ${{ github.workspace }}/vcpkg integrate install shell: pwsh - name: Build x64 Release From 83311d83b3a41da5f0d5f76be9dd7a13ee12b018 Mon Sep 17 00:00:00 2001 From: hoshiizumiya <63837495+hoshiizumiya@users.noreply.github.com> Date: Wed, 24 Dec 2025 18:17:17 +0800 Subject: [PATCH 11/12] fix: CI workflow --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e88640..fa8be42 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,7 +62,7 @@ jobs: run: nuget restore OpenNet.slnx - name: Install vcpkg dependencies for VS - run: ${{ github.workspace }}/vcpkg integrate install + run: ${{ github.workspace }}\vcpkg integrate install shell: pwsh - name: Build x64 Release From a22c1f45d569c94dae4e94b6499d9b8361b7c0f4 Mon Sep 17 00:00:00 2001 From: hoshiizumiya <63837495+hoshiizumiya@users.noreply.github.com> Date: Wed, 24 Dec 2025 18:29:11 +0800 Subject: [PATCH 12/12] fix: CI workflow --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa8be42..85bfa34 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,7 +62,8 @@ jobs: run: nuget restore OpenNet.slnx - name: Install vcpkg dependencies for VS - run: ${{ github.workspace }}\vcpkg integrate install + working-directory: ${{env.GITHUB_WORKSPACE}} + run: vcpkg integrate install shell: pwsh - name: Build x64 Release