From 59809bbae383f1225e082f52fb0ba20f612cf951 Mon Sep 17 00:00:00 2001 From: Erwin van der Valk Date: Wed, 5 Feb 2025 14:15:39 +0100 Subject: [PATCH] modified code based on damian's feedback --- .github/workflow-gen/Program.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflow-gen/Program.cs b/.github/workflow-gen/Program.cs index e9dd69c28..207691f44 100644 --- a/.github/workflow-gen/Program.cs +++ b/.github/workflow-gen/Program.cs @@ -77,9 +77,7 @@ void GenerateCiWorkflow(Component component) job.StepPack(project); } - job.StepSign() - .OnlyIfOnBranch() - ; + job.StepSign(); job.StepPush("MyGet", "https://www.myget.org/F/duende_identityserver/api/v2/package", "MYGET"); @@ -193,7 +191,7 @@ public static Step IfRefMain(this Step step) /// Only run this if the build is triggered on a branch IN the same repo /// this means it's from a trusted contributor. /// - public static Step OnlyIfOnBranch(this Step step) + public static Step IfGithubEventIsPush(this Step step) => step.If("github.event == 'push'"); public static void StepTestAndReport(this Job job, string componentName, string testProject) @@ -243,7 +241,7 @@ public static Step StepSign(this Job job) "--azure-key-vault-certificate NuGetPackageSigning"; return job.Step() .Name("Sign packages") - .OnlyIfOnBranch() + .IfGithubEventIsPush() .Run($""" for file in artifacts/*.nupkg; do dotnet NuGetKeyVaultSignTool sign "$file" {flags}