Skip to content

Commit

Permalink
Merge pull request #16 from rafek1241/feature/update-build
Browse files Browse the repository at this point in the history
Include autogenerated github_token from workflow
  • Loading branch information
rafek1241 authored Mar 17, 2021
2 parents f3cbb7e + a9badb7 commit 50042db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/continous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
run: ./build.cmd ContinousIntegration
env:
NugetApiKey: ${{ secrets.NugetApiKey }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v1
with:
name: nuget
Expand Down
7 changes: 5 additions & 2 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
OnPushBranches = new[] { "master","feature/*" },
OnPullRequestBranches = new[] { "master" },
InvokedTargets = new[] { nameof(ContinousIntegration) },
ImportSecrets = new[] { nameof(NugetApiKey) },
ImportSecrets = new[] { nameof(NugetApiKey), GithubTokenSecretName },
PublishArtifacts = true
)]
class Build : NukeBuild
Expand All @@ -37,14 +37,17 @@ class Build : NukeBuild
/// - JetBrains Rider https://nuke.build/rider
/// - Microsoft VisualStudio https://nuke.build/visualstudio
/// - Microsoft VSCode https://nuke.build/vscode

const string GithubTokenSecretName = "GITHUB_TOKEN";

public static int Main() => Execute<Build>(x => x.Compile);

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

[Parameter] string NugetApiUrl = "https://api.nuget.org/v3/index.json"; //default
[Parameter] string NugetApiKey;
[Parameter] string GitHubAuthenticationToken;
[Parameter(Name = GithubTokenSecretName)] string GitHubAuthenticationToken;

[Solution] readonly Solution Solution;
[GitRepository] readonly GitRepository GitRepository;
Expand Down

0 comments on commit 50042db

Please sign in to comment.