From 3117aefd54f56293bf896092a9541b651286f1d2 Mon Sep 17 00:00:00 2001 From: qhy040404 Date: Tue, 4 Jun 2024 21:00:27 +0800 Subject: [PATCH] try to fix permission --- build.cake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.cake b/build.cake index 2efbc8f6..fc7cf7fa 100644 --- a/build.cake +++ b/build.cake @@ -11,6 +11,7 @@ var version = "version"; var repoDir = "repoDir"; var outputPath = "outputPath"; +var pfxPath = "pfxPath"; var pw = "pw"; // Extension @@ -66,7 +67,8 @@ if (GitHubActions.IsRunningOnGitHubActions) var certificateBase64 = HasEnvironmentVariable("CERTIFICATE") ? EnvironmentVariable("CERTIFICATE") : throw new Exception("Cannot find CERTIFICATE"); pw = HasEnvironmentVariable("PW") ? EnvironmentVariable("PW") : throw new Exception("Cannot find PW"); - System.IO.File.WriteAllBytes(System.IO.Path.Combine(outputPath, "temp.pfx"), System.Convert.FromBase64String(certificateBase64)); + pfxPath = System.IO.Path.Combine(repoDir, "temp.pfx"); + System.IO.File.WriteAllBytes(pfxPath, System.Convert.FromBase64String(certificateBase64)); Information($"Version: {version}"); } @@ -256,7 +258,6 @@ Task("Sign") } var signPath = System.IO.Path.Combine(winsdkBinPath, "signtool.exe"); - var pfxPath = System.IO.Path.Combine(outputPath, "temp.pfx"); var arguments = $"sign /debug /v /a /fd SHA256 /f {pfxPath} /p {pw} {System.IO.Path.Combine(outputPath, $"Snap.Hutao.Alpha-{version}.msix")}"; var p = StartProcess(