Skip to content

Commit 2384e0b

Browse files
Merge pull request #11 from DilmurodDeveloper/users/DilmurodDeveloper/infra-build-init
INFRA: Initialize Build Project
2 parents 8b5ed4a + 464ddad commit 2384e0b

File tree

4 files changed

+122
-0
lines changed

4 files changed

+122
-0
lines changed

.github/workflows/dotnet.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: LibraryManagement Build Pipline
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
jobs:
10+
Build:
11+
runs-on: windows-2022
12+
steps:
13+
- name: Checking Out Code
14+
uses: actions/checkout@v2
15+
- name: Seting Up .Net
16+
uses: actions/setup-dotnet@v1
17+
with:
18+
dotnet-version: 8.0.412
19+
include-prerelease: false
20+
- name: Restoring Nuget Packages
21+
run: dotnet restore
22+
- name: Building Project
23+
run: dotnet build --no-restore
24+
- name: Running Tests
25+
run: dotnet test --no-build --verbosity normal
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net8.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<PackageReference Include="ADotNet" Version="4.1.0" />
12+
</ItemGroup>
13+
14+
</Project>
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
//-----------------------------------------------------------
2+
// Copyright (c) Coalition of Good-Hearted Engineers
3+
// Free To Use To Build Reliable Library Management Solutions
4+
//-----------------------------------------------------------
5+
6+
using ADotNet.Clients;
7+
using ADotNet.Models.Pipelines.GithubPipelines.DotNets;
8+
using ADotNet.Models.Pipelines.GithubPipelines.DotNets.Tasks;
9+
using ADotNet.Models.Pipelines.GithubPipelines.DotNets.Tasks.SetupDotNetTaskV1s;
10+
11+
var githubPipeline = new GithubPipeline
12+
{
13+
Name = "LibraryManagement Build Pipline",
14+
15+
OnEvents = new Events
16+
{
17+
PullRequest = new PullRequestEvent
18+
{
19+
Branches = new string[] { "master" }
20+
},
21+
22+
Push = new PushEvent
23+
{
24+
Branches = new string[] { "master" }
25+
}
26+
},
27+
28+
Jobs = new Dictionary<string, Job>
29+
{
30+
{
31+
"Build",
32+
new Job
33+
{
34+
RunsOn = BuildMachines.Windows2022,
35+
36+
Steps = new List<GithubTask>
37+
{
38+
new CheckoutTaskV2
39+
{
40+
Name = "Checking Out Code"
41+
},
42+
43+
new SetupDotNetTaskV1
44+
{
45+
Name = "Seting Up .Net",
46+
47+
TargetDotNetVersion = new TargetDotNetVersion
48+
{
49+
DotNetVersion = "8.0.412",
50+
}
51+
},
52+
53+
new RestoreTask
54+
{
55+
Name = "Restoring Nuget Packages"
56+
},
57+
58+
new DotNetBuildTask
59+
{
60+
Name = "Building Project"
61+
},
62+
63+
new TestTask
64+
{
65+
Name = "Running Tests"
66+
}
67+
}
68+
}
69+
}
70+
}
71+
};
72+
73+
var client = new ADotNetClient();
74+
75+
client.SerializeAndWriteToFile(
76+
adoPipeline: githubPipeline,
77+
path: "../../../../.github/workflows/dotnet.yml");

LibraryManagement.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibraryManagement.Api", "Li
77
EndProject
88
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibraryManagement.Api.Tests.Unit", "LibraryManagement.Api.Tests.Unit\LibraryManagement.Api.Tests.Unit.csproj", "{AF000EF4-2C94-4C07-B34B-A08A03D4853C}"
99
EndProject
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibraryManagement.Api.Infrastructure.Build", "LibraryManagement.Api.Infrastructure.Build\LibraryManagement.Api.Infrastructure.Build.csproj", "{3735E352-3056-4273-9D31-C8C689E08377}"
11+
EndProject
1012
Global
1113
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1214
Debug|Any CPU = Debug|Any CPU
@@ -21,6 +23,10 @@ Global
2123
{AF000EF4-2C94-4C07-B34B-A08A03D4853C}.Debug|Any CPU.Build.0 = Debug|Any CPU
2224
{AF000EF4-2C94-4C07-B34B-A08A03D4853C}.Release|Any CPU.ActiveCfg = Release|Any CPU
2325
{AF000EF4-2C94-4C07-B34B-A08A03D4853C}.Release|Any CPU.Build.0 = Release|Any CPU
26+
{3735E352-3056-4273-9D31-C8C689E08377}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27+
{3735E352-3056-4273-9D31-C8C689E08377}.Debug|Any CPU.Build.0 = Debug|Any CPU
28+
{3735E352-3056-4273-9D31-C8C689E08377}.Release|Any CPU.ActiveCfg = Release|Any CPU
29+
{3735E352-3056-4273-9D31-C8C689E08377}.Release|Any CPU.Build.0 = Release|Any CPU
2430
EndGlobalSection
2531
GlobalSection(SolutionProperties) = preSolution
2632
HideSolutionNode = FALSE

0 commit comments

Comments
 (0)