fix: 修复 checksum.txt 未上传至 Release 的问题

This commit is contained in:
Liam Sho
2022-07-14 01:17:35 +08:00
parent 7f4e5223a4
commit d47a747a28
4 changed files with 2 additions and 14 deletions

View File

@@ -12,7 +12,7 @@ public partial class Build
void CreateGitHubRelease(string repo, string commitish, string releaseName)
{
var assets = Parameters.ArtifactOutput.GlobFiles("*.zip");
var assets = Parameters.ArtifactOutput.GlobFiles("*.zip", "checksum.txt");
var release = new NewRelease(Version)
{

View File

@@ -30,6 +30,7 @@ public partial class Build
Credentials = new Credentials(Parameters.GitHubPersonalAccessToken)
};
// ReSharper disable once InvertIf
if (Parameters.GhActionName == ActionConfiguration.ReleaseMaa)
{
Information($"运行 ReleaseMaa 将在 {Parameters.MainRepo} 创建 Release {Parameters.GhTag}");
@@ -38,13 +39,5 @@ public partial class Build
return;
}
// ReSharper disable once InvertIf
if (Parameters.GhActionName == ActionConfiguration.ReleaseMaaResource)
{
Information($"运行 ReleaseMaaResource 将在 {Parameters.MaaResourceReleaseRepo} 创建 Release {Version}");
CreateGitHubRelease(Parameters.MaaResourceReleaseRepo, "main", Version);
}
});
}

View File

@@ -62,7 +62,6 @@ public partial class Build : NukeBuild
Information("2. 仓库");
Information($"主仓库:{Parameters.MainRepo ?? "Null"}");
Information($"MaaResource 发布仓库:{Parameters.MaaResourceReleaseRepo ?? "Null"}");
Information($"主分支:{Parameters.MasterBranchRef ?? "Null"}");
Information($"开发分支:{Parameters.DevBranchRef ?? "Null"}");
Information($"发布 Tag 前缀:{Parameters.ReleaseTagRefPrefix ?? "Null"}");

View File

@@ -65,7 +65,6 @@ public partial class Build
public string MasterBranchRef { get; }
public string DevBranchRef { get; }
public string ReleaseTagRefPrefix { get; }
public string MaaResourceReleaseRepo { get; }
// 路径
public AbsolutePath BuildOutput { get; }
@@ -106,7 +105,6 @@ public partial class Build
// 仓库
MainRepo = "MaaAssistantArknights/MaaAssistantArknights";
MaaResourceReleaseRepo = "MaaAssistantArknights/MaaResourceRelease";
MasterBranchRef = "refs/heads/master";
DevBranchRef = "refs/heads/dev";
@@ -201,8 +199,6 @@ public partial class Build
{
// Fork
MainRepo = b.GitHubActions.Repository;
var repoOwner = MainRepo.Split("/")[0];
MaaResourceReleaseRepo = $"{repoOwner}/MaaResourceRelease";
}
// 若是 DevBuildBranch 必须不为 Master或者是 PR 至 Dev又或者是手动触发