Skip to content

Commit 8f64dd9

Browse files
committed
chore: Update pyro download to use GH token.
1 parent 321ad7d commit 8f64dd9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

build.cake

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
var isCIBuild = EnvironmentVariable("CI") == "true";
99
var isRelease = isCIBuild && EnvironmentVariable("RELEASE") == "true";
1010
var isPrerelease = isRelease && EnvironmentVariable("PRERELEASE") == "true";
11+
var githubToken = EnvironmentVariable("CI") == "true" ? EnvironmentVariable("GH_TOKEN") : null;
1112

1213
var target = Argument("target", "default");
1314
var solution = File("./DarkId.Papyrus.sln");
@@ -56,6 +57,10 @@ public void UpdatePyroCli()
5657
}
5758

5859
var client = new Octokit.GitHubClient(new Octokit.ProductHeaderValue("Papyrus-Lang-CI"));
60+
if (githubToken != null)
61+
{
62+
client.Credentials = new Octokit.Credentials(githubToken);
63+
}
5964

6065
client.Repository.Release.GetAll("fireundubh", "pyro").ContinueWith((task) =>
6166
{

0 commit comments

Comments
 (0)