-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmise.toml
More file actions
65 lines (55 loc) · 1.63 KB
/
mise.toml
File metadata and controls
65 lines (55 loc) · 1.63 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
[tools]
dotnet = "10"
[tasks.build]
description = "Build the project"
run = "dotnet build KdlSharp.sln -c Release"
[tasks.test]
description = "Run tests"
run = "dotnet test KdlSharp.Tests -c Release --no-build"
[tasks.check]
description = "Run all static analysis"
run = "dotnet format KdlSharp.sln --verify-no-changes"
[tasks."check:fix"]
description = "Auto-fix formatting issues"
run = "dotnet format KdlSharp.sln"
[tasks.clean]
description = "Remove build artifacts"
run = "find . -type d \\( -name bin -o -name obj -o -name nupkg \\) -exec rm -rf {} + 2>/dev/null || true"
[tasks.restore]
description = "Restore dependencies"
run = [
"git submodule update --init --recursive",
"dotnet restore KdlSharp.sln",
]
[tasks.pack]
description = "Create NuGet package"
run = "dotnet pack KdlSharp/KdlSharp.csproj -c Release --no-build -o nupkg"
[tasks.version]
description = "Bump version, stage, and commit"
usage = 'arg "<version>"'
run = '''
if ! echo "$usage_version" | grep -qE '^[0-9]+(\.[0-9]+)*$'; then
echo "Error: version must contain only digits and dots (got: $usage_version)" >&2
exit 1
fi
echo "$usage_version" > VERSION
git add VERSION
git diff --cached --quiet && echo "Already at $usage_version" || git commit -m "chore: bump version to $usage_version"
'''
[tasks.publish]
description = "Bump version, push, and trigger release"
usage = 'arg "<version>"'
run = [
"mise run version $usage_version",
"git push",
"gh workflow run publish.yml",
]
[tasks.ci]
description = "Full CI pipeline"
run = [
{ task = "clean" },
{ task = "restore" },
{ task = "check" },
{ task = "build" },
{ task = "test" },
]