Skip to content

Commit 50042db

Browse files
authored
Merge pull request #16 from rafek1241/feature/update-build
Include autogenerated github_token from workflow
2 parents f3cbb7e + a9badb7 commit 50042db

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/continous-integration.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
run: ./build.cmd ContinousIntegration
3636
env:
3737
NugetApiKey: ${{ secrets.NugetApiKey }}
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3839
- uses: actions/upload-artifact@v1
3940
with:
4041
name: nuget

build/Build.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
OnPushBranches = new[] { "master","feature/*" },
2828
OnPullRequestBranches = new[] { "master" },
2929
InvokedTargets = new[] { nameof(ContinousIntegration) },
30-
ImportSecrets = new[] { nameof(NugetApiKey) },
30+
ImportSecrets = new[] { nameof(NugetApiKey), GithubTokenSecretName },
3131
PublishArtifacts = true
3232
)]
3333
class Build : NukeBuild
@@ -37,14 +37,17 @@ class Build : NukeBuild
3737
/// - JetBrains Rider https://nuke.build/rider
3838
/// - Microsoft VisualStudio https://nuke.build/visualstudio
3939
/// - Microsoft VSCode https://nuke.build/vscode
40+
41+
const string GithubTokenSecretName = "GITHUB_TOKEN";
42+
4043
public static int Main() => Execute<Build>(x => x.Compile);
4144

4245
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
4346
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
4447

4548
[Parameter] string NugetApiUrl = "https://api.nuget.org/v3/index.json"; //default
4649
[Parameter] string NugetApiKey;
47-
[Parameter] string GitHubAuthenticationToken;
50+
[Parameter(Name = GithubTokenSecretName)] string GitHubAuthenticationToken;
4851

4952
[Solution] readonly Solution Solution;
5053
[GitRepository] readonly GitRepository GitRepository;

0 commit comments

Comments
 (0)