mirror of
https://github.com/NuclearPowered/Reactor.git
synced 2026-10-19 15:51:54 +00:00
Migrate to Reactor.MSBuild
This commit is contained in:
11 files changed
+82
-187
No files matched your search
+34
@@ -0,0 +1,34 @@
|
||||
var target = Argument("target", "Build");
|
||||
|
||||
var buildId = EnvironmentVariable("GITHUB_RUN_NUMBER");
|
||||
|
||||
var @ref = EnvironmentVariable("GITHUB_REF");
|
||||
const string prefix = "refs/tags/";
|
||||
var tag = !string.IsNullOrEmpty(@ref) && @ref.StartsWith(prefix) ? @ref.Substring(prefix.Length) : null;
|
||||
|
||||
Task("Build")
|
||||
.Does(() =>
|
||||
{
|
||||
var settings = new DotNetCoreBuildSettings
|
||||
{
|
||||
Configuration = "Release",
|
||||
MSBuildSettings = new DotNetCoreMSBuildSettings()
|
||||
};
|
||||
|
||||
if (tag != null)
|
||||
{
|
||||
settings.MSBuildSettings.Properties["Version"] = new[] { tag };
|
||||
}
|
||||
else if (buildId != null)
|
||||
{
|
||||
settings.VersionSuffix = "ci." + buildId;
|
||||
}
|
||||
|
||||
foreach (var gamePlatform in new[] { "Steam", "Itch" })
|
||||
{
|
||||
settings.MSBuildSettings.Properties["GamePlatform"] = new[] { gamePlatform };
|
||||
DotNetCoreBuild(".", settings);
|
||||
}
|
||||
});
|
||||
|
||||
RunTarget(target);
|
||||
Reference in new issue
Block a user