diff --git a/build.cake b/build.cake index 6bab3409046e48544e7643dc15ecc134119a3643..10c0811627a4e5fdf63681a88fd447ac6ca45abf 100644 --- a/build.cake +++ b/build.cake @@ -241,24 +241,26 @@ IEnumerable<string> redirectedStandardOutput; out redirectedStandardOutput );*/ - var json = $"{{\"name\": \"v{semanticVersion}\", \"tag_name\": \"v{semanticVersion}\" \"description\": \"{description}\"}}"; var settings = new HttpSettings { Headers = new Dictionary<string, string> { - {"PRIVATE-TOKEN", gitlabToken}, - } + {"PRIVATE-TOKEN", gitlabToken}, + }, + EnsureSuccessStatusCode = true, }; // create tag + settings.SetJsonRequestBody("{}"); var responseBody = HttpPost($"https://git.rwth-aachen.de/api/v4/projects/{gitlabProjectId}/repository/tags?tag_name=v{semanticVersion}&ref=master&release_description={description}", settings); Information(responseBody); // create release - //settings.SetJsonRequestBody(json); - //responseBody = HttpPost($"https://git.rwth-aachen.de/api/v4/projects/{gitlabProjectId}/releases", settings); - //Information(responseBody); + var json = $"{{\"name\": \"v{semanticVersion}\", \"tag_name\": \"v{semanticVersion}\" \"description\": \"{description}\"}}"; + settings.SetJsonRequestBody(json); + responseBody = HttpPost($"https://git.rwth-aachen.de/api/v4/projects/{gitlabProjectId}/releases", settings); + Information(responseBody); }); Task("Build")