Skip to content

Commit

Permalink
Upgrade to NUKE 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lahma committed Sep 10, 2024
1 parent 9bf8f69 commit 7dd3100
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 94 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
name: windows-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
.nuke/temp
Expand All @@ -47,17 +47,17 @@ jobs:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
MYGET_API_KEY: ${{ secrets.MYGET_API_KEY }}
- name: 'Publish: artifacts'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: artifacts
path: artifacts
ubuntu-latest:
name: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
.nuke/temp
Expand All @@ -69,7 +69,7 @@ jobs:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
MYGET_API_KEY: ${{ secrets.MYGET_API_KEY }}
- name: 'Publish: artifacts'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: artifacts
path: artifacts
12 changes: 8 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,18 @@ on:
- '**/*.*'
- '!**/*.md'

concurrency:
group: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
windows-latest:
name: windows-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
.nuke/temp
Expand All @@ -44,9 +48,9 @@ jobs:
name: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
.nuke/temp
Expand Down
138 changes: 70 additions & 68 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,71 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/build",
"title": "Build Schema",
"properties": {
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Debug",
"Release"
]
},
"MyGetApiKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"NuGetApiKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
}
},
"definitions": {
"build": {
"type": "object",
"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": {
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Debug",
"Release"
]
},
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
Expand All @@ -23,38 +75,13 @@
"description": "Shows the help text for this build assembly"
},
"Host": {
"type": "string",
"description": "Host for execution. Default is 'automatic'",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
},
"MyGetApiKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
"$ref": "#/definitions/Host"
},
"NoLogo": {
"type": "boolean",
"description": "Disables displaying the NUKE logo"
},
"NuGetApiKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"Partition": {
"type": "string",
"description": "Partition to use on CI"
Expand All @@ -78,47 +105,22 @@
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
"type": "string",
"enum": [
"Clean",
"Compile",
"Pack",
"Publish",
"Restore",
"Test"
]
"$ref": "#/definitions/ExecutableTarget"
}
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
},
"Target": {
"type": "array",
"description": "List of targets to be invoked. Default is '{default_target}'",
"items": {
"type": "string",
"enum": [
"Clean",
"Compile",
"Pack",
"Publish",
"Restore",
"Test"
]
"$ref": "#/definitions/ExecutableTarget"
}
},
"Verbosity": {
"type": "string",
"description": "Logging verbosity during build execution. Default is 'Normal'",
"enum": [
"Minimal",
"Normal",
"Quiet",
"Verbose"
]
"$ref": "#/definitions/Verbosity"
}
}
}
}
},
"$ref": "#/definitions/NukeBuild"
}
29 changes: 14 additions & 15 deletions build/Build.CI.GitHubActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,25 @@
"pr",
GitHubActionsImage.WindowsLatest,
GitHubActionsImage.UbuntuLatest,
OnPullRequestBranches = new[] { "master", "main" },
OnPullRequestIncludePaths = new[] { "**/*.*" },
OnPullRequestExcludePaths = new[] { "**/*.md" },
OnPullRequestBranches = ["master", "main"],
OnPullRequestIncludePaths = ["**/*.*"],
OnPullRequestExcludePaths = ["**/*.md"],
PublishArtifacts = false,
InvokedTargets = new[] { nameof(Compile), nameof(Test), nameof(Pack) },
CacheKeyFiles = new[] { "global.json", "src/**/*.csproj", "src/**/package.json" }),
InvokedTargets = [nameof(Compile), nameof(Test), nameof(Pack)],
CacheKeyFiles = ["global.json", "src/**/*.csproj", "src/**/package.json"],
ConcurrencyCancelInProgress = true)
]
[GitHubActions(
"build",
GitHubActionsImage.WindowsLatest,
GitHubActionsImage.UbuntuLatest,
OnPushBranches = new[] { "master", "main" },
OnPushTags = new[] { "v*.*.*", "v*.*.*-*" },
OnPushIncludePaths = new[] { "**/*.*" },
OnPushExcludePaths = new[] { "**/*.md" },
OnPushBranches = ["master", "main"],
OnPushTags = ["v*.*.*", "v*.*.*-*"],
OnPushIncludePaths = ["**/*.*"],
OnPushExcludePaths = ["**/*.md"],
PublishArtifacts = true,
InvokedTargets = new[] { nameof(Compile), nameof(Test), nameof(Pack), nameof(Publish) },
ImportSecrets = new [] { "NUGET_API_KEY", "MYGET_API_KEY" },
CacheKeyFiles = new[] { "global.json", "src/**/*.csproj", "src/**/package.json" })
InvokedTargets = [nameof(Compile), nameof(Test), nameof(Pack), nameof(Publish)],
ImportSecrets = ["NUGET_API_KEY", "MYGET_API_KEY"],
CacheKeyFiles = ["global.json", "src/**/*.csproj", "src/**/package.json"])
]
public partial class Build
{
}
public partial class Build;
2 changes: 1 addition & 1 deletion build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nuke.Common" Version="8.0.0" />
<PackageReference Include="Nuke.Common" Version="8.1.0" />
<PackageDownload Include="NuGet.CommandLine" Version="[5.11.0]" />
</ItemGroup>

Expand Down

0 comments on commit 7dd3100

Please sign in to comment.