mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-20 02:55:38 +08:00
4
.github/workflows/release-nightly-ota.yml
vendored
4
.github/workflows/release-nightly-ota.yml
vendored
@@ -34,8 +34,6 @@ jobs:
|
||||
include:
|
||||
- msbuild_target: x64
|
||||
lowercase_target: x64
|
||||
- msbuild_target: ARM64
|
||||
lowercase_target: arm64
|
||||
fail-fast: false
|
||||
env:
|
||||
MAABUILDER_TARGET_PLATFORM: ${{ matrix.msbuild_target }}
|
||||
@@ -127,7 +125,7 @@ jobs:
|
||||
needs: [build-win-nightly, push-tag]
|
||||
strategy:
|
||||
matrix:
|
||||
target: [x64, arm64]
|
||||
target: [x64]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo ${{ needs.build-win-nightly.outputs.tag }}
|
||||
|
||||
2
.github/workflows/release-ota.yml
vendored
2
.github/workflows/release-ota.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
make-ota:
|
||||
runs-on: "ubuntu-latest"
|
||||
matrix:
|
||||
target: [x64, arm64]
|
||||
target: [x64]
|
||||
steps:
|
||||
- name: "Fetch MaaRelease"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
@@ -155,6 +155,16 @@ namespace MaaWpfGui
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the OS architecture.
|
||||
/// </summary>
|
||||
public static string OSArchitecture => RuntimeInformation.OSArchitecture.ToString().ToLower();
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the OS is arm.
|
||||
/// </summary>
|
||||
public static bool IsArm => OSArchitecture.StartsWith("arm");
|
||||
|
||||
private const string RequestUrl = "repos/MaaAssistantArknights/MaaRelease/releases";
|
||||
private const string StableRequestUrl = "repos/MaaAssistantArknights/MaaAssistantArknights/releases/latest";
|
||||
private const string MaaReleaseRequestUrlByTag = "repos/MaaAssistantArknights/MaaRelease/releases/tags/";
|
||||
@@ -641,7 +651,14 @@ namespace MaaWpfGui
|
||||
if (name.Contains("ota") && name.Contains("win") && name.Contains($"{_curVersion}_{_latestVersion}"))
|
||||
{
|
||||
_assetsObject = curAssets as JObject;
|
||||
break;
|
||||
if (IsArm ^ name.Contains("arm"))
|
||||
{
|
||||
continue; // 兼容旧版本,以前 ota 不区分指令集架构
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user