generated from DaemonBeast/LGPL-3.0-Template
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.cake
More file actions
28 lines (23 loc) · 688 Bytes
/
build.cake
File metadata and controls
28 lines (23 loc) · 688 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
var target = Argument("target", "Build");
var workflow = BuildSystem.GitHubActions.Environment.Workflow;
var buildId = workflow.RunNumber;
var tag = workflow.RefType == GitHubActionsRefType.Tag ? workflow.RefName : null;
Task("Build")
.Does(() =>
{
var settings = new DotNetBuildSettings
{
Configuration = "Release",
MSBuildSettings = new DotNetMSBuildSettings()
};
if (tag != null)
{
settings.MSBuildSettings.Version = tag.TrimStart('v');
}
else if (buildId != 0)
{
settings.MSBuildSettings.VersionSuffix = "ci." + buildId;
}
DotNetBuild(".", settings);
});
RunTarget(target);