mirror of
https://github.com/Biarity/Sieve.git
synced 2025-04-12 23:12:53 +02:00
Check if NUGET_API_KEY can be accessed
This commit is contained in:
parent
034730bffb
commit
1e29271fd9
2
.github/workflows/ci_publish.yml
vendored
2
.github/workflows/ci_publish.yml
vendored
@ -30,3 +30,5 @@ jobs:
|
|||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Run './build.cmd CiPublish'
|
- name: Run './build.cmd CiPublish'
|
||||||
run: ./build.cmd CiPublish
|
run: ./build.cmd CiPublish
|
||||||
|
env:
|
||||||
|
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
|
||||||
|
@ -43,6 +43,9 @@
|
|||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Disables displaying the NUKE logo"
|
"description": "Disables displaying the NUKE logo"
|
||||||
},
|
},
|
||||||
|
"NUGET_API_KEY": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"Plan": {
|
"Plan": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Shows the execution plan (HTML)"
|
"description": "Shows the execution plan (HTML)"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using Colorful;
|
||||||
using Nuke.Common;
|
using Nuke.Common;
|
||||||
using Nuke.Common.CI;
|
using Nuke.Common.CI;
|
||||||
using Nuke.Common.CI.GitHubActions;
|
using Nuke.Common.CI.GitHubActions;
|
||||||
@ -22,7 +23,8 @@ using static Nuke.Common.Tools.DotNet.DotNetTasks;
|
|||||||
OnPushBranches = new[] {"master", "releases/*"},
|
OnPushBranches = new[] {"master", "releases/*"},
|
||||||
AutoGenerate = true,
|
AutoGenerate = true,
|
||||||
InvokedTargets = new[] {nameof(CiPublish)},
|
InvokedTargets = new[] {nameof(CiPublish)},
|
||||||
CacheKeyFiles = new string[0])]
|
CacheKeyFiles = new string[0],
|
||||||
|
ImportSecrets = new[] {"NUGET_API_KEY"})]
|
||||||
class Build : NukeBuild
|
class Build : NukeBuild
|
||||||
{
|
{
|
||||||
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
|
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
|
||||||
@ -34,6 +36,9 @@ class Build : NukeBuild
|
|||||||
|
|
||||||
[Solution] readonly Solution Solution;
|
[Solution] readonly Solution Solution;
|
||||||
|
|
||||||
|
// ReSharper disable once InconsistentNaming
|
||||||
|
[Parameter] string NUGET_API_KEY;
|
||||||
|
|
||||||
Project SieveProject => Solution.AllProjects.First(p => p.Name == "Sieve");
|
Project SieveProject => Solution.AllProjects.First(p => p.Name == "Sieve");
|
||||||
|
|
||||||
AbsolutePath OutputDirectory => RootDirectory / "output";
|
AbsolutePath OutputDirectory => RootDirectory / "output";
|
||||||
@ -91,6 +96,7 @@ class Build : NukeBuild
|
|||||||
.DependsOn(Package)
|
.DependsOn(Package)
|
||||||
.Executes(() =>
|
.Executes(() =>
|
||||||
{
|
{
|
||||||
|
Console.WriteLine(string.IsNullOrEmpty(NUGET_API_KEY));
|
||||||
});
|
});
|
||||||
|
|
||||||
Target Ci => _ => _
|
Target Ci => _ => _
|
||||||
|
Loading…
x
Reference in New Issue
Block a user