-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for AzurePipelines NuGetAuthenticate and NpmAuthenticate
- Loading branch information
1 parent
6ed9e4d
commit d099d0b
Showing
5 changed files
with
107 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
source/Nuke.Common/CI/AzurePipelines/Configuration/AzurePipelinesNpmAuthenticateStep.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2024 Maintainers of NUKE. | ||
// Distributed under the MIT License. | ||
// https://github.com/nuke-build/nuke/blob/master/LICENSE | ||
|
||
using Nuke.Common.Utilities; | ||
|
||
namespace Nuke.Common.CI.AzurePipelines.Configuration; | ||
|
||
public class AzurePipelinesNpmAuthenticateStep : AzurePipelinesStep | ||
{ | ||
public string NpmrcPath { get; set; } | ||
|
||
public override void Write(CustomFileWriter writer) | ||
{ | ||
using (writer.WriteBlock("- task: npmAuthenticate@0")) | ||
{ | ||
writer.WriteLine($"displayName: 'npm Authenticate {NpmrcPath}'"); | ||
using (writer.WriteBlock("inputs:")) | ||
{ | ||
writer.WriteLine($"workingFile: {NpmrcPath.SingleQuote()}"); | ||
} | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
source/Nuke.Common/CI/AzurePipelines/Configuration/AzurePipelinesNuGetAuthenticateStep.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright 2024 Maintainers of NUKE. | ||
// Distributed under the MIT License. | ||
// https://github.com/nuke-build/nuke/blob/master/LICENSE | ||
|
||
using Nuke.Common.Utilities; | ||
|
||
namespace Nuke.Common.CI.AzurePipelines.Configuration; | ||
|
||
public class AzurePipelinesNuGetAuthenticateStep : AzurePipelinesStep | ||
{ | ||
public override void Write(CustomFileWriter writer) | ||
{ | ||
using (writer.WriteBlock("- task: NuGetAuthenticate@1")) | ||
{ | ||
writer.WriteLine("displayName: 'NuGet Authenticate'"); | ||
} | ||
} | ||
} |