mirror of
https://github.com/Biarity/Sieve.git
synced 2024-12-05 03:26:22 +01: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
|
||||
- name: Run './build.cmd CiPublish'
|
||||
run: ./build.cmd CiPublish
|
||||
env:
|
||||
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
|
||||
|
@ -43,6 +43,9 @@
|
||||
"type": "boolean",
|
||||
"description": "Disables displaying the NUKE logo"
|
||||
},
|
||||
"NUGET_API_KEY": {
|
||||
"type": "string"
|
||||
},
|
||||
"Plan": {
|
||||
"type": "boolean",
|
||||
"description": "Shows the execution plan (HTML)"
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using Colorful;
|
||||
using Nuke.Common;
|
||||
using Nuke.Common.CI;
|
||||
using Nuke.Common.CI.GitHubActions;
|
||||
@ -22,7 +23,8 @@ using static Nuke.Common.Tools.DotNet.DotNetTasks;
|
||||
OnPushBranches = new[] {"master", "releases/*"},
|
||||
AutoGenerate = true,
|
||||
InvokedTargets = new[] {nameof(CiPublish)},
|
||||
CacheKeyFiles = new string[0])]
|
||||
CacheKeyFiles = new string[0],
|
||||
ImportSecrets = new[] {"NUGET_API_KEY"})]
|
||||
class Build : NukeBuild
|
||||
{
|
||||
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
|
||||
@ -34,6 +36,9 @@ class Build : NukeBuild
|
||||
|
||||
[Solution] readonly Solution Solution;
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
[Parameter] string NUGET_API_KEY;
|
||||
|
||||
Project SieveProject => Solution.AllProjects.First(p => p.Name == "Sieve");
|
||||
|
||||
AbsolutePath OutputDirectory => RootDirectory / "output";
|
||||
@ -91,6 +96,7 @@ class Build : NukeBuild
|
||||
.DependsOn(Package)
|
||||
.Executes(() =>
|
||||
{
|
||||
Console.WriteLine(string.IsNullOrEmpty(NUGET_API_KEY));
|
||||
});
|
||||
|
||||
Target Ci => _ => _
|
||||
|
Loading…
Reference in New Issue
Block a user