1515 fail-fast : false
1616 matrix :
1717 configuration : [Debug ,Release]
18- platform : [x86 ,x64]
18+ platform : [x86 ,x64 ,ARM64 ]
1919
2020 runs-on : windows-latest # 最新的 Windows 环境
2121
5959 echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
6060 echo "XENGINE_LIB32=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
6161 shell : pwsh
62-
62+ - name : Set up Dependency ARM64 Environment
63+ if : matrix.platform == 'ARM64'
64+ run : |
65+ $response = Invoke-RestMethod -Uri "https://api.github.com/repos/libxengine/libxengine/releases/latest" -Headers @{"Accept"="application/vnd.github.v3+json"}
66+ $latest_tag = $response.tag_name
67+ Write-Host "Latest Tag: $latest_tag"
68+
69+ $url = "https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Windows_Arm64.zip"
70+ Invoke-WebRequest -Uri $url -OutFile "XEngine_Windows_Arm64.zip"
71+ Expand-Archive -Path ./XEngine_Windows_Arm64.zip -DestinationPath ./XEngine_Windows -Force
72+
73+ echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
74+ echo "XENGINE_LibArm64=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
75+ shell : pwsh
76+
6377 - name : Setup MSBuild
6478 uses : microsoft/setup-msbuild@v2
6579
@@ -85,18 +99,34 @@ jobs:
8599 cd XEngine_Release
86100 ./VSCopy_x64.bat
87101 shell : pwsh
102+ - name : Conditional Step for Arm64 Release
103+ if : matrix.configuration == 'Release' && matrix.platform == 'Arm64'
104+ run : |
105+ cp -r XEngine_Source/ARM64/Release/*.dll XEngine_Release/
106+ cp -r XEngine_Source/ARM64/Release/*.exe XEngine_Release/
107+ cp -r XEngine_Source/VSCopy_Arm64.bat XEngine_Release/
108+ cd XEngine_Release
109+ ./VSCopy_Arm64.bat
110+ shell : pwsh
88111
89112 - name : Upload folder as artifact with x86
90113 if : matrix.configuration == 'Release' && matrix.platform == 'x86'
91114 uses : actions/upload-artifact@v4
92115 with :
93- name : XEngine_AuthorizeService-x86_32- Windows
116+ name : XEngine_AuthorizeService-Windows-x86_32
94117 path : XEngine_Release/
95118 retention-days : 1
96119 - name : Upload folder as artifact with x64
97120 if : matrix.configuration == 'Release' && matrix.platform == 'x64'
98121 uses : actions/upload-artifact@v4
99122 with :
100- name : XEngine_AuthorizeService-x86_64-Windows
123+ name : XEngine_AuthorizeService-Windows-x86_64
124+ path : XEngine_Release/
125+ retention-days : 1
126+ - name : Upload folder as artifact with Arm64
127+ if : matrix.configuration == 'Release' && matrix.platform == 'Arm64'
128+ uses : actions/upload-artifact@v4
129+ with :
130+ name : XEngine_AuthorizeService-Windows-Arm64
101131 path : XEngine_Release/
102132 retention-days : 1
0 commit comments