Skip to content

Commit

Permalink
Updated build instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianRappl committed May 22, 2016
1 parent bf1886b commit 69e50be
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -159,21 +159,28 @@ Task("Publish-Release")

if (String.IsNullOrEmpty(githubToken))
{
throw new InvalidOperationException("Could not resolve AngleSharp GitHub token.");
throw new InvalidOperationException("Could not resolve MAGES GitHub token.");
}

var github = new GitHubClient(new ProductHeaderValue("MagesCakeBuild"))
{
Credentials = new Credentials(githubToken)
};

github.Release.Create("FlorianRappl", "Mages", new NewRelease("v" + version)
var release = github.Release.Create("FlorianRappl", "Mages", new NewRelease("v" + version)
{
Name = version,
Body = String.Join(Environment.NewLine, releaseNotes.Notes),
Prerelease = false,
TargetCommitish = "master"
}).Wait();
}).Result;

var libPath = buildResultDir + File("Mages.Core.dll");

using (var libStream = System.IO.File.OpenRead(libPath.Path.FullPath))
{
github.Release.UploadAsset(release, new ReleaseAssetUpload("Mages.Core.dll", "application/x-msdownload", libStream, null)).Wait();
}
});

Task("Update-AppVeyor-Build-Number")
Expand Down

0 comments on commit 69e50be

Please sign in to comment.