Skip to content

Commit ffb2be9

Browse files
authored
Merge pull request #63 from The-Standard-Organization/users/cjdutoit/coderub-update-packages
CODE RUB: Updated packages and .net version to 9.0
2 parents 5dd457c + 67a5b61 commit ffb2be9

File tree

5 files changed

+97
-17
lines changed

5 files changed

+97
-17
lines changed

.github/workflows/dotnet.yml

Lines changed: 78 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,80 @@ on:
77
branches:
88
- main
99
jobs:
10+
label:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Apply Label
14+
uses: actions/github-script@v6
15+
with:
16+
github-token: ${{ secrets.GITHUB_TOKEN }}
17+
script: >-
18+
const prefixes = [
19+
'INFRA:',
20+
'PROVISIONS:',
21+
'RELEASES:',
22+
'DATA:',
23+
'BROKERS:',
24+
'FOUNDATIONS:',
25+
'PROCESSINGS:',
26+
'ORCHESTRATIONS:',
27+
'COORDINATIONS:',
28+
'MANAGEMENTS:',
29+
'AGGREGATIONS:',
30+
'CONTROLLERS:',
31+
'CLIENTS:',
32+
'EXPOSERS:',
33+
'PROVIDERS:',
34+
'BASE:',
35+
'COMPONENTS:',
36+
'VIEWS:',
37+
'PAGES:',
38+
'ACCEPTANCE:',
39+
'INTEGRATIONS:',
40+
'CODE RUB:',
41+
'MINOR FIX:',
42+
'MEDIUM FIX:',
43+
'MAJOR FIX:',
44+
'DOCUMENTATION:',
45+
'CONFIG:',
46+
'STANDARD:',
47+
'DESIGN:',
48+
'BUSINESS:'
49+
];
50+
51+
52+
const pullRequest = context.payload.pull_request;
53+
54+
55+
if (!pullRequest) {
56+
console.log('No pull request context available.');
57+
return;
58+
}
59+
60+
61+
const title = context.payload.pull_request.title;
62+
63+
const existingLabels = context.payload.pull_request.labels.map(label => label.name);
64+
65+
66+
for (const prefix of prefixes) {
67+
if (title.startsWith(prefix)) {
68+
const label = prefix.slice(0, -1);
69+
if (!existingLabels.includes(label)) {
70+
console.log(`Applying label: ${label}`);
71+
await github.rest.issues.addLabels({
72+
owner: context.repo.owner,
73+
repo: context.repo.repo,
74+
issue_number: context.payload.pull_request.number,
75+
labels: [label]
76+
});
77+
}
78+
break;
79+
}
80+
}
81+
permissions:
82+
contents: read
83+
pull-requests: write
1084
build:
1185
runs-on: ubuntu-latest
1286
steps:
@@ -15,7 +89,7 @@ jobs:
1589
- name: Setup .Net
1690
uses: actions/setup-dotnet@v3
1791
with:
18-
dotnet-version: 7.0.201
92+
dotnet-version: 9.0.100
1993
- name: Restore
2094
run: dotnet restore
2195
- name: Build
@@ -53,7 +127,7 @@ jobs:
53127
54128
sudo apt-get install xmlstarlet
55129
56-
version_number=$(xmlstarlet sel -t -v "//Version" -n ADotNet/ADotNet.csproj)
130+
version_number=$(xmlstarlet sel -t -v "//Version" -n Xeption/Xeption.csproj)
57131
58132
echo "$version_number"
59133
@@ -72,7 +146,7 @@ jobs:
72146
73147
sudo apt-get install xmlstarlet
74148
75-
package_release_notes=$(xmlstarlet sel -t -v "//PackageReleaseNotes" -n ADotNet/ADotNet.csproj)
149+
package_release_notes=$(xmlstarlet sel -t -v "//PackageReleaseNotes" -n Xeption/Xeption.csproj)
76150
77151
echo "$package_release_notes"
78152
@@ -114,7 +188,7 @@ jobs:
114188
- name: Setup .Net
115189
uses: actions/setup-dotnet@v3
116190
with:
117-
dotnet-version: 7.0.201
191+
dotnet-version: 9.0.100
118192
- name: Restore
119193
run: dotnet restore
120194
- name: Build

Xeption.Infrastructure.Build/Program.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ internal class Program
1616
static void Main(string[] args)
1717
{
1818
string branchName = "main";
19+
string dotNetVersion = "9.0.100";
1920
var adotNetClient = new ADotNetClient();
2021

2122
var githubPipeline = new GithubPipeline
@@ -37,6 +38,10 @@ static void Main(string[] args)
3738

3839
Jobs = new Dictionary<string, Job>
3940
{
41+
{
42+
"label",
43+
new LabelJobV2(runsOn: BuildMachines.UbuntuLatest)
44+
},
4045
{
4146
"build",
4247
new Job
@@ -56,7 +61,7 @@ static void Main(string[] args)
5661

5762
With = new TargetDotNetVersionV3
5863
{
59-
DotNetVersion = "7.0.201"
64+
DotNetVersion = dotNetVersion
6065
}
6166
},
6267

@@ -88,9 +93,10 @@ static void Main(string[] args)
8893
},
8994
{
9095
"publish",
91-
new PublishJob(
96+
new PublishJobV2(
9297
runsOn: BuildMachines.UbuntuLatest,
9398
dependsOn: "add_tag",
99+
dotNetVersion: dotNetVersion,
94100
nugetApiKey: "${{ secrets.NUGET_ACCESS }}")
95101
}
96102
}

Xeption.Infrastructure.Build/Xeption.Infrastructure.Build.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
5+
<TargetFramework>net9.0</TargetFramework>
66
<ImplicitUsings>disable</ImplicitUsings>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="ADotNet" Version="3.0.2" />
10+
<PackageReference Include="ADotNet" Version="3.1.0" />
1111
</ItemGroup>
1212

1313
</Project>

Xeption.Tests/Xeption.Tests.csproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<Nullable>disable</Nullable>
66
<IsPackable>false</IsPackable>
77
<ImplicitUsings>disable</ImplicitUsings>
88
</PropertyGroup>
99

1010
<ItemGroup>
1111
<PackageReference Include="DeepCloner" Version="0.10.4" />
12-
<PackageReference Include="FluentAssertions" Version="6.5.1" />
13-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0-preview-20220131-20" />
12+
<PackageReference Include="FluentAssertions" Version="7.0.0" />
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
1414
<PackageReference Include="System.Collections" Version="4.3.0" />
15-
<PackageReference Include="Tynamix.ObjectFiller" Version="1.5.7" />
16-
<PackageReference Include="xunit" Version="2.4.2-pre.12" />
17-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
15+
<PackageReference Include="Tynamix.ObjectFiller" Version="1.5.9" />
16+
<PackageReference Include="xunit" Version="2.9.2" />
17+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
1818
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1919
<PrivateAssets>all</PrivateAssets>
2020
</PackageReference>
21-
<PackageReference Include="coverlet.collector" Version="3.1.2">
21+
<PackageReference Include="coverlet.collector" Version="6.0.2">
2222
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2323
<PrivateAssets>all</PrivateAssets>
2424
</PackageReference>

Xeption/Xeption.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
<ItemGroup>
4141
<PackageReference Include="DeepCloner" Version="0.10.4" />
42-
<PackageReference Include="FluentAssertions" Version="6.5.1" />
42+
<PackageReference Include="FluentAssertions" Version="7.0.0" />
4343
<PackageReference Include="System.Linq" Version="4.3.0" />
4444
</ItemGroup>
4545

0 commit comments

Comments
 (0)