diff --git a/.fleet/settings.json b/.fleet/settings.json
new file mode 100644
index 0000000..b9ad294
--- /dev/null
+++ b/.fleet/settings.json
@@ -0,0 +1,7 @@
+{
+ "files.exclude": [
+ "out",
+ ".idea",
+ ".vs"
+ ]
+}
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index de4c3a6..68ca660 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -24,6 +24,14 @@ jobs:
submodules: recursive
- name: Set up .NET
uses: actions/setup-dotnet@v4.0.0
- - name: Build project
+ - name: Run Cake
run: |
- dotnet build
+ ./cake
+ - name: Upload artifacts
+ if: always()
+ uses: actions/upload-artifact@v3.1.3
+ with:
+ name: ${{ github.workflow }}-${{ github.run_number }}-${{ github.run_attempt }}-${{ matrix.os }}-${{ matrix.cfg }}
+ path: |
+ out/log
+ out/pkg
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index e6a0f78..31b5626 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -11,6 +11,7 @@ env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
DOTNET_NOLOGO: true
+ NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
jobs:
release:
if: github.repository == 'vezel-dev/zig-toolsets'
@@ -23,9 +24,14 @@ jobs:
submodules: recursive
- name: Set up .NET
uses: actions/setup-dotnet@v4.0.0
- - name: Build project
+ - name: Run Cake
run: |
- dotnet build
- - name: Upload NuGet packages
- run: |
- dotnet nuget push pkg/feed/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_TOKEN }} --skip-duplicate
+ ./cake upload
+ - name: Upload artifacts
+ if: always()
+ uses: actions/upload-artifact@v3.1.3
+ with:
+ name: ${{ github.workflow }}-${{ github.run_number }}-${{ github.run_attempt }}-${{ matrix.os }}-${{ matrix.cfg }}
+ path: |
+ out/log
+ out/pkg
diff --git a/.gitignore b/.gitignore
index 0a46d42..8244a8e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,4 @@
-.vs
+/out
*.user
-/pkg/cache/*/*
-/pkg/feed/*.nupkg
-bin
-obj
+.idea
+.vs
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 5cb3d40..38ba0ed 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,9 +1,7 @@
{
"files.exclude": {
- "**/.vs": true,
- "pkg/cache/*[!_._]": true,
- "pkg/feed/*.nupkg": true,
- "**/bin": true,
- "**/obj": true
+ "out": true,
+ "**/.idea": true,
+ "**/.vs": true
}
}
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
deleted file mode 100644
index deb9065..0000000
--- a/.vscode/tasks.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "version": "2.0.0",
- "tasks": [
- {
- "label": "Build",
- "presentation": {
- "panel": "dedicated",
- "reveal": "silent",
- "revealProblems": "onProblem",
- "showReuseMessage": false,
- "clear": true
- },
- "group": {
- "kind": "build",
- "isDefault": true
- },
- "type": "process",
- "command": "dotnet",
- "args": [
- "build",
- "-clp:NoSummary"
- ],
- "runOptions": {
- "instanceLimit": 1
- },
- "problemMatcher": "$msCompile"
- },
- {
- "label": "Clean",
- "presentation": {
- "panel": "dedicated",
- "reveal": "silent",
- "revealProblems": "onProblem",
- "showReuseMessage": false,
- "clear": true
- },
- "type": "process",
- "command": "dotnet",
- "args": [
- "clean",
- "-clp:NoSummary"
- ],
- "runOptions": {
- "instanceLimit": 1
- },
- "problemMatcher": "$msCompile"
- }
- ]
-}
diff --git a/Directory.Build.props b/Directory.Build.props
index 44d024e..5bc25f9 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -11,7 +11,6 @@
@@ -97,6 +98,11 @@ The following MSBuild properties will be injected into your project:
* `ZigLibPath`: Path to the Zig standard library.
* `ZigDocPath`: Path to the Zig standard library documentation.
+## Building
+
+Simply run `./cake` (a [Bash](https://www.gnu.org/software/bash) script) to
+build artifacts.
+
## License
This project is licensed under the terms found in
diff --git a/cake b/cake
new file mode 100644
index 0000000..25afce3
--- /dev/null
+++ b/cake
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+set -eou pipefail
+
+cd -- "$(dirname -- "$(readlink -e -- "${BASH_SOURCE[0]}")")"
+
+dotnet tool restore
+dotnet cake zig-toolsets.cake -t "${1:-default}" "${@:2}"
diff --git a/cake.config b/cake.config
new file mode 100644
index 0000000..db9a181
--- /dev/null
+++ b/cake.config
@@ -0,0 +1,8 @@
+[Paths]
+Addins=out/bld/addins
+Cache=out/bld/cache
+Tools=out/bld/tools
+
+[Settings]
+SkipVerification=true
+EnableScriptCache=true
diff --git a/dotnet-tools.json b/dotnet-tools.json
new file mode 100644
index 0000000..3f28733
--- /dev/null
+++ b/dotnet-tools.json
@@ -0,0 +1,12 @@
+{
+ "version": 1,
+ "isRoot": true,
+ "tools": {
+ "cake.tool": {
+ "version": "4.0.0",
+ "commands": [
+ "dotnet-cake"
+ ]
+ }
+ }
+}
diff --git a/nuget.config b/nuget.config
index 1171405..70aca96 100644
--- a/nuget.config
+++ b/nuget.config
@@ -1,6 +1,6 @@