Fix 'Release to GitHub' build definition (#135)

* Update git-release.cake

* log packages that are being released

* update repository owner

* tag 'develop' branch when making new release

* add RELEASE.md

* Update RELEASE.md

* Update git-release.cake
This commit is contained in:
Evgenii Poletaikin 2018-10-09 18:19:21 +03:00 коммит произвёл Max
Родитель 5bf9633515
Коммит e138a56ad5
2 изменённых файлов: 17 добавлений и 16 удалений

1
RELEASE.md Normal file
Просмотреть файл

@ -0,0 +1 @@
New release description, automatically pulled from RELEASE.md file

Просмотреть файл

@ -18,30 +18,30 @@ Task("GitRelease")
var username = "user";
var password = Argument<string>("GithubToken");
var owner = "Microsoft";
var repo = "mobile-center-sdk-unity";
// Create temp release file.
System.IO.File.Create("tempRelease.md").Dispose();
var releaseFile = File("tempRelease.md");
FileWriteText(releaseFile,"Please update description. It will be pulled out automatically from release.md next time.");
var repo = "AppCenter-SDK-Unity";
// Build a string containing paths to NuGet packages
var files = GetFiles("output/*.unitypackage");
var assets = string.Empty;
var assets = new List<string>();
Information("Releasing packages:");
foreach (var file in files)
{
assets += file.FullPath + ",";
if (!file.FullPath.EndsWith("AppCenter-v" + publishVersion + ".unitypackage") &&
!file.FullPath.EndsWith("AppCenterPush-v" + publishVersion + ".unitypackage"))
{
Information(file.FullPath);
assets.Add(file.FullPath);
}
}
assets = assets.Substring(0,assets.Length-1);
GitReleaseManagerCreate(username, password, owner, repo, new GitReleaseManagerCreateSettings {
Prerelease = true,
Assets = assets,
TargetCommitish = "master",
InputFilePath = releaseFile.Path.FullPath,
GitReleaseManagerCreate(username, password, owner, repo, new GitReleaseManagerCreateSettings
{
Prerelease = false,
Assets = string.Join(",", assets),
TargetCommitish = "develop",
InputFilePath = new FilePath("RELEASE.md"),
Name = publishVersion
});
GitReleaseManagerPublish(username, password, owner, repo, publishVersion);
DeleteFile(releaseFile);
GitReleaseManagerPublish(username, password, owner, repo, publishVersion);
});
RunTarget(TARGET);