forked from Hamunii/BepInEx.AutoPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.cake
More file actions
29 lines (24 loc) · 719 Bytes
/
build.cake
File metadata and controls
29 lines (24 loc) · 719 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
29
var target = Argument("target", "Build");
var skipCiVersion = Argument("skip-ci-version", false);
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;
}
else if (buildId != 0 && !skipCiVersion)
{
settings.MSBuildSettings.VersionSuffix = "ci." + buildId;
}
DotNetBuild(".", settings);
});
RunTarget(target);