Skip to content

Commit

Permalink
modified code based on damian's feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Erwinvandervalk committed Feb 5, 2025
1 parent 2b78eaa commit 59809bb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflow-gen/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down Expand Up @@ -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.
/// </summary>
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)
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 59809bb

Please sign in to comment.