Skip to content

Commit 897b5f0

Browse files
Switched to new central package versioning (#817)
1 parent 03cdd00 commit 897b5f0

File tree

81 files changed

+1224
-584
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1224
-584
lines changed

.build/Solution.cs

+80-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,48 @@
11
using System.Collections.Generic;
22
using System.Linq;
33
using Nuke.Common.CI.GitHubActions;
4+
using Nuke.Common.CI.GitHubActions.Configuration;
45
using Rocket.Surgery.Nuke.ContinuousIntegration;
56
using Rocket.Surgery.Nuke.DotNetCore;
67
using Rocket.Surgery.Nuke.GithubActions;
78

9+
10+
internal class LocalConstants
11+
{
12+
public static string[] PathsIgnore =
13+
{
14+
".codecov.yml",
15+
".editorconfig",
16+
".gitattributes",
17+
".gitignore",
18+
".gitmodules",
19+
".lintstagedrc.js",
20+
".prettierignore",
21+
".prettierrc",
22+
"LICENSE",
23+
"nukeeper.settings.json",
24+
"omnisharp.json",
25+
"package-lock.json",
26+
"package.json",
27+
"Readme.md",
28+
".github/dependabot.yml",
29+
".github/labels.yml",
30+
".github/release.yml",
31+
".github/renovate.json",
32+
};
33+
}
34+
35+
[GitHubActionsSteps(
36+
"ci-ignore",
37+
GitHubActionsImage.WindowsLatest,
38+
GitHubActionsImage.UbuntuLatest,
39+
AutoGenerate = false,
40+
On = new[] { GitHubActionsTrigger.Push },
41+
OnPushTags = new[] { "v*" },
42+
OnPushBranches = new[] { "master", "main", "next" },
43+
OnPullRequestBranches = new[] { "master", "main", "next" },
44+
Enhancements = new[] { nameof(CiIgnoreMiddleware) }
45+
)]
846
[GitHubActionsSteps(
947
"ci",
1048
GitHubActionsImage.MacOsLatest,
@@ -27,24 +65,53 @@
2765
nameof(Default)
2866
},
2967
ExcludedTargets = new[] { nameof(ICanClean.Clean), nameof(ICanRestoreWithDotNetCore.DotnetToolRestore) },
30-
Enhancements = new[] { nameof(Middleware) }
68+
Enhancements = new[] { nameof(CiMiddleware) }
3169
)]
3270
[PrintBuildVersion]
3371
[PrintCIEnvironment]
3472
[UploadLogs]
3573
[TitleEvents]
3674
public partial class Solution
3775
{
38-
public static RocketSurgeonGitHubActionsConfiguration Middleware(RocketSurgeonGitHubActionsConfiguration configuration)
76+
public static RocketSurgeonGitHubActionsConfiguration CiIgnoreMiddleware(
77+
RocketSurgeonGitHubActionsConfiguration configuration
78+
)
3979
{
80+
foreach (var item in configuration.DetailedTriggers.OfType<RocketSurgeonGitHubActionsVcsTrigger>())
81+
{
82+
item.IncludePaths = LocalConstants.PathsIgnore;
83+
}
84+
85+
configuration.Jobs.RemoveAt(1);
86+
( (RocketSurgeonsGithubActionsJob)configuration.Jobs[0] ).Steps = new List<GitHubActionsStep>
87+
{
88+
new RunStep("N/A")
89+
{
90+
Run = "echo \"No build required\""
91+
}
92+
};
93+
94+
return configuration;
95+
}
96+
97+
public static RocketSurgeonGitHubActionsConfiguration CiMiddleware(
98+
RocketSurgeonGitHubActionsConfiguration configuration
99+
)
100+
{
101+
foreach (var item in configuration.DetailedTriggers.OfType<RocketSurgeonGitHubActionsVcsTrigger>())
102+
{
103+
item.ExcludePaths = LocalConstants.PathsIgnore;
104+
}
105+
40106
var buildJob = configuration.Jobs.OfType<RocketSurgeonsGithubActionsJob>().First(z => z.Name == "Build");
41107
buildJob.FailFast = false;
42108
var checkoutStep = buildJob.Steps.OfType<CheckoutStep>().Single();
43109
// For fetch all
44110
checkoutStep.FetchDepth = 0;
45111
buildJob.Environment["NUGET_PACKAGES"] = "${{ github.workspace }}/.nuget/packages";
46112
buildJob.Steps.InsertRange(
47-
buildJob.Steps.IndexOf(checkoutStep) + 1, new BaseGitHubActionsStep[]
113+
buildJob.Steps.IndexOf(checkoutStep) + 1,
114+
new BaseGitHubActionsStep[]
48115
{
49116
new RunStep("Fetch all history for all tags and branches")
50117
{
@@ -58,7 +125,7 @@ public static RocketSurgeonGitHubActionsConfiguration Middleware(RocketSurgeonGi
58125
["path"] = "${{ github.workspace }}/.nuget/packages",
59126
// keep in mind using central package versioning here
60127
["key"] =
61-
"${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Build.targets', '**/Directory.Build.props', '**/*.csproj') }}",
128+
"${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}-${{ hashFiles('**/Directory.Packages.support.props') }}",
62129
["restore-keys"] = @"|
63130
${{ runner.os }}-nuget-"
64131
}
@@ -81,7 +148,6 @@ public static RocketSurgeonGitHubActionsConfiguration Middleware(RocketSurgeonGi
81148
With = new Dictionary<string, string>
82149
{
83150
["name"] = "actions-${{ matrix.os }}",
84-
["fail_ci_if_error"] = "true",
85151
}
86152
}
87153
);
@@ -122,6 +188,15 @@ public static RocketSurgeonGitHubActionsConfiguration Middleware(RocketSurgeonGi
122188
}
123189
);
124190

191+
buildJob.Steps.Add(
192+
new UploadArtifactStep("Publish Docs")
193+
{
194+
Name = "docs",
195+
Path = "artifacts/docs/",
196+
If = "always()"
197+
}
198+
);
199+
125200
return configuration;
126201
}
127202
}

.editorconfig

-6
Original file line numberDiff line numberDiff line change
@@ -1009,12 +1009,6 @@ resharper_web_config_type_not_resolved_highlighting = warning
10091009
resharper_web_config_wrong_module_highlighting = warning
10101010
resharper_partial_type_with_single_part_highlighting = none
10111011

1012-
# .NET Analzyer settings
1013-
# VSTHRD200: Use "Async" suffix for awaitable methods
1014-
dotnet_diagnostic.VSTHRD200.severity = none
1015-
# CA2007: Do not directly await a Task
1016-
dotnet_diagnostic.CA2007.severity = error
1017-
10181012
ij_xml_align_attributes = true
10191013
ij_xml_align_text = false
10201014
ij_xml_attribute_wrap = normal

.github/dependabot.yml

-28
This file was deleted.

.github/label-commenter-dependabot.yml

-5
This file was deleted.

.github/labels.yml

+63-51
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,66 @@
1-
- name: "bug"
2-
color: "d73a4a"
1+
- name: 'bug'
2+
color: 'd73a4a'
33
description: "Something isn't working"
4-
- name: "documentation"
4+
- name: 'documentation'
55
color: 0075ca
6-
description: "Improvements or additions to documentation"
7-
- name: "duplicate"
8-
color: "cfd3d7"
9-
description: "This issue or pull request already exists"
10-
- name: "enhancement"
11-
color: "a2eeef"
12-
description: "New feature or request"
13-
- name: "help wanted"
14-
color: "008672"
15-
description: "Extra attention is needed"
16-
- name: "good first issue"
17-
color: "7057ff"
18-
description: "Good for newcomers"
19-
- name: "invalid"
20-
color: "e4e669"
6+
description: 'Improvements or additions to documentation'
7+
- name: 'duplicate'
8+
color: 'cfd3d7'
9+
description: 'This issue or pull request already exists'
10+
- name: 'enhancement'
11+
color: 'a2eeef'
12+
description: 'New feature or request'
13+
- name: 'help wanted'
14+
color: '008672'
15+
description: 'Extra attention is needed'
16+
- name: 'good first issue'
17+
color: '7057ff'
18+
description: 'Good for newcomers'
19+
- name: 'invalid'
20+
color: 'e4e669'
2121
description: "This doesn't seem right"
22-
- name: "question"
23-
color: "d876e3"
24-
description: "Further information is requested"
25-
- name: "wontfix"
26-
color: "ffffff"
27-
description: "This will not be worked on"
28-
- name: "feature"
29-
color: "ccf5ff"
30-
description: "This adds some form of new functionality"
31-
- name: "breaking change"
32-
color: "efa7ae"
33-
description: "This breaks existing behavior"
34-
- name: "mysterious"
35-
color: "cccccc"
36-
description: "We forgot to label this"
37-
- name: "chore"
38-
color: "27127c"
39-
description: "Just keeping things neat and tidy"
40-
- name: "dependencies"
41-
color: "edc397"
42-
description: "Pull requests that update a dependency file"
43-
- name: "merge"
44-
color: "98ed98"
45-
description: "Shipit!"
46-
- name: "deprecated"
47-
color: "dd824d"
48-
description: "Deprecated functionality"
49-
- name: "removed"
50-
color: "fce99f"
51-
description: "Removed functionality"
52-
- name: "security"
53-
color: "cbce1e"
54-
description: "Security related issue"
22+
- name: 'question'
23+
color: 'd876e3'
24+
description: 'Further information is requested'
25+
- name: 'wontfix'
26+
color: 'ffffff'
27+
description: 'This will not be worked on'
28+
- name: 'feature'
29+
color: 'ccf5ff'
30+
description: 'This adds some form of new functionality'
31+
- name: 'breaking change'
32+
color: 'efa7ae'
33+
description: 'This breaks existing behavior'
34+
- name: 'mysterious'
35+
color: 'cccccc'
36+
description: 'We forgot to label this'
37+
- name: 'chore'
38+
color: '27127c'
39+
description: 'Just keeping things neat and tidy'
40+
- name: 'dependencies'
41+
color: 'edc397'
42+
description: 'Pull requests that update a dependency file'
43+
- name: 'merge'
44+
color: '98ed98'
45+
description: 'Shipit!'
46+
- name: 'deprecated'
47+
color: 'dd824d'
48+
description: 'Deprecated functionality'
49+
- name: 'removed'
50+
color: 'fce99f'
51+
description: 'Removed functionality'
52+
- name: 'security'
53+
color: 'cbce1e'
54+
description: 'Security related issue'
55+
- name: 'private-dependencies'
56+
color: 'edc397'
57+
description: 'Private dependency'
58+
- name: 'rebase'
59+
color: 'ffcc66'
60+
description: 'Rebase branch'
61+
- name: 'stop updating'
62+
color: '800000'
63+
description: 'Stop Updating'
64+
- name: 'blocked'
65+
color: 'FF5600'
66+
description: 'Issue is blocked waiting for something or someone'

0 commit comments

Comments
 (0)