Skip to content

Commit

Permalink
chore: synchronise build config from Dirt.Args (#20)
Browse files Browse the repository at this point in the history
* chore: synchronise build config from Dirt.Args

* fix: remove build config for build project

* fix: remove windows configurations
  • Loading branch information
rhysparry authored Dec 8, 2024
1 parent 2565149 commit d0949c9
Show file tree
Hide file tree
Showing 27 changed files with 1,607 additions and 62 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.nuke/build.schema.json text=auto
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,17 @@ updates:
commit-message:
prefix: "chore"
include: "scope"
- package-ecosystem: "dotnet-sdk"
directory: "/"
schedule:
interval: "weekly"
day: "wednesday"
ignore:
- dependency-name: "*"
update-types:
- "version-update:semver-major"
assignees:
- "rhysparry"
commit-message:
prefix: "chore"
include: "scope"
21 changes: 8 additions & 13 deletions .github/workflows/dotnet-ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET Core
with:
fetch-depth: 0
- name: Setup .NET Core 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- name: Install just
uses: extractions/setup-just@v2

- name: Restore dependencies
run: just --no-deps restore

- name: Build
run: just --no-deps build

- name: "Install tools"
uses: taiki-e/install-action@v2
with:
tool: [email protected],[email protected]
- name: Test
run: just --no-deps test
run: just test
42 changes: 19 additions & 23 deletions .github/workflows/nuget-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,36 @@ on:
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET Core
with:
fetch-depth: 0
- name: Setup .NET Core 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- name: Install just
uses: extractions/setup-just@v2

- name: Restore dependencies
run: just --no-deps restore

- name: Build
run: just --no-deps build

- name: "Install tools"
uses: taiki-e/install-action@v2
with:
tool: [email protected],[email protected]
- name: Test
run: just --no-deps test

run: just test
if: ${{ ! startsWith(github.ref, 'refs/tags/v') }}
- name: Pack
run: just --no-deps pack
run: just pack
if: startsWith(github.ref, 'refs/tags/v')
- name: Create Release Notes
run: just release-notes
if: startsWith(github.ref, 'refs/tags/v')

- name: Create a release with the NuGet Package
uses: softprops/action-gh-release@v2
with:
files: '**/*.nupkg'
body_path: artifacts/RELEASE-NOTES.md
files: |
artifacts/*.nupkg
artifacts/*.snupkg
if: startsWith(github.ref, 'refs/tags/v')

- name: Load NuGet API Key
uses: 1password/load-secrets-action@v2
with:
Expand All @@ -48,8 +46,6 @@ jobs:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
NUGET_API_KEY: "op://GitHub Actions/NuGet API Dirt/credential"
if: startsWith(github.ref, 'refs/tags/v')

- name: Push NuGet package
run: just --no-deps nuget-push
if: startsWith(github.ref, 'refs/tags/v')

run: just nuget-push-no-pack
if: startsWith(github.ref, 'refs/tags/v')
137 changes: 137 additions & 0 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {
"Host": {
"type": "string",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
},
"ExecutableTarget": {
"type": "string",
"enum": [
"Clean",
"Compile",
"Pack",
"Publish",
"Restore",
"Test"
]
},
"Verbosity": {
"type": "string",
"description": "",
"enum": [
"Verbose",
"Normal",
"Minimal",
"Quiet"
]
},
"NukeBuild": {
"properties": {
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
},
"Help": {
"type": "boolean",
"description": "Shows the help text for this build assembly"
},
"Host": {
"description": "Host for execution. Default is 'automatic'",
"$ref": "#/definitions/Host"
},
"NoLogo": {
"type": "boolean",
"description": "Disables displaying the NUKE logo"
},
"Partition": {
"type": "string",
"description": "Partition to use on CI"
},
"Plan": {
"type": "boolean",
"description": "Shows the execution plan (HTML)"
},
"Profile": {
"type": "array",
"description": "Defines the profiles to load",
"items": {
"type": "string"
}
},
"Root": {
"type": "string",
"description": "Root directory during build execution"
},
"Skip": {
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
"$ref": "#/definitions/ExecutableTarget"
}
},
"Target": {
"type": "array",
"description": "List of targets to be invoked. Default is '{default_target}'",
"items": {
"$ref": "#/definitions/ExecutableTarget"
}
},
"Verbosity": {
"description": "Logging verbosity during build execution. Default is 'Normal'",
"$ref": "#/definitions/Verbosity"
}
}
}
},
"allOf": [
{
"properties": {
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Debug",
"Release"
]
},
"GithubRef": {
"type": "string",
"description": "GitHub Ref"
},
"NuGetApiKey": {
"type": "string",
"description": "NuGet API key",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
},
"Version": {
"type": "string",
"description": "Version to use"
}
}
},
{
"$ref": "#/definitions/NukeBuild"
}
]
}
5 changes: 5 additions & 0 deletions .nuke/parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "./build.schema.json",
"Solution": "Dirt.Env.sln",
"Version": "1.2.1"
}
4 changes: 4 additions & 0 deletions .nuke/temp/build-attempt.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
0cbc6611f5540bd0809a388dc95a615b
Restore
Compile
Test
Loading

0 comments on commit d0949c9

Please sign in to comment.