Skip to content

Commit

Permalink
[Minor][DX-203] add yaml and nuget.config (#38)
Browse files Browse the repository at this point in the history
* add yaml and nuget.config

* update nuget packages

* add release.yaml

* [Minor][DX-203] move codefresh pipelines

* add package push back in

* [Minor][DX-203] enable push in release

* remove nuget cmd line

* remove nuget.config adj yaml

* really, really remvove nuget.config
  • Loading branch information
DavidAtBede authored Nov 17, 2023
1 parent d3ed951 commit b59e7bf
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 10 deletions.
53 changes: 53 additions & 0 deletions .codefresh/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
version: "1.0"
stages:
- setup
- build + test
- package + release

steps:
clone:
title: Cloning repository
type: git-clone
repo: BedeGaming/Dapperer
revision: ${{CF_BRANCH}}
git: github
stage: setup

bump_build_number:
title: Bump default build_number annotation
type: bump-build-number
stage: setup

increment_semver_pr:
title: Semantic Versioning (PR)
type: bedegaming/semantic-versioning
stage: setup
arguments:
WORKING_DIRECTORY: ${{CF_VOLUME_PATH}}/${{CF_REPO_NAME}}
FAIL_ON_NO_SEMVER_TAG: false
RESET_BUILD_COUNTER_ON_NEW_SEMVER_TAG: false
BUILD_VERSION_SUFFIX: -rc
SET_VERSION_TO_LATEST: true

restore:
title: Restoring packages
stage: build + test
image: mcr.microsoft.com/dotnet/sdk:6.0
working_directory: ${{clone}}/src
commands:
- dotnet restore

build:
title: Building
stage: build + test
image: mcr.microsoft.com/dotnet/sdk:6.0
working_directory: ${{clone}}/src
commands:
- dotnet build --no-restore -c Release -p:Version=${{CF_BUILD_VERSION}}

push_nupkgs:
title: Push nupkgs
stage: package + release
image: mcr.microsoft.com/dotnet/sdk:6.0
commands:
- dotnet nuget push ${{CF_VOLUME_PATH}}/${{CF_REPO_NAME}}/**/*.nupkg -k ${{secrets.codefresh-secrets.nexus-api-key}} -s http://repos.ad.bedegaming.com:8081/repository/nuget-components/
59 changes: 59 additions & 0 deletions .codefresh/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
version: "1.0"
stages:
- setup
- build + test
- package + release

steps:
clone:
title: Cloning repository
type: git-clone
repo: BedeGaming/Dapperer
revision: ${{CF_BRANCH}}
git: github
stage: setup

bump_build_number:
title: Bump default build_number annotation
type: bump-build-number
stage: setup

increment_semver:
title: Semantic Versioning (release)
type: bedegaming/semantic-versioning
stage: setup
arguments:
WORKING_DIRECTORY: ${{CF_VOLUME_PATH}}/${{CF_REPO_NAME}}
FAIL_ON_NO_SEMVER_TAG: true
RESET_BUILD_COUNTER_ON_NEW_SEMVER_TAG: true

restore:
title: Restoring packages
stage: build + test
image: mcr.microsoft.com/dotnet/sdk:6.0
working_directory: ${{clone}}/src
commands:
- dotnet restore

build:
title: Building
stage: build + test
image: mcr.microsoft.com/dotnet/sdk:6.0
working_directory: ${{clone}}/src
commands:
- dotnet build --no-restore -c Release -p:Version=${{CF_BUILD_VERSION}}

github_release:
title: Create github release
stage: package + release
image: en1bdess01acr.azurecr.io/codefresh-image-base:latest
commands:
- cd ${{CF_VOLUME_PATH}}/${{CF_REPO_NAME}}
- gh release create ${{CF_BUILD_VERSION}} --title ${{CF_BUILD_VERSION}} --target ${{CF_REVISION}} --notes ""

push_nupkgs:
title: Push nupkgs
stage: package + release
image: mcr.microsoft.com/dotnet/sdk:6.0
commands:
- dotnet nuget push ${{CF_VOLUME_PATH}}/${{CF_REPO_NAME}}/**/*.nupkg -k ${{secrets.codefresh-secrets.nexus-api-key}} -s http://repos.ad.bedegaming.com:8081/repository/nuget-components/
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.3.1" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
</ItemGroup>


Expand Down
6 changes: 3 additions & 3 deletions src/Dapperer.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29806.167
# Visual Studio Version 17
VisualStudioVersion = 17.6.33815.320
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dapperer", "Dapperer\Dapperer.csproj", "{7A2A3C1D-FC60-4DCA-9692-4CBA76215F6D}"
EndProject
Expand All @@ -14,7 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dapperer.Tests.Unit", "Tests\Dapperer.Tests.Unit\Dapperer.Tests.Unit.csproj", "{BE3F5389-1917-44EF-9ACA-94BB6DA7B519}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dapperer.TestApp.AspNetCore", "Dapperer.TestApp.AspNetCore\Dapperer.TestApp.AspNetCore.csproj", "{A2FF7D40-20CE-45FF-B752-7A3BECCFC665}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dapperer.TestApp.AspNetCore", "Dapperer.TestApp.AspNetCore\Dapperer.TestApp.AspNetCore.csproj", "{A2FF7D40-20CE-45FF-B752-7A3BECCFC665}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
4 changes: 2 additions & 2 deletions src/Dapperer/Dapperer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapper" Version="2.0.30" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="1.1.3"/>
<PackageReference Include="Dapper" Version="2.1.15" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.2" />
</ItemGroup>

</Project>
8 changes: 4 additions & 4 deletions src/Tests/Dapperer.Tests.Unit/Dapperer.Tests.Unit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Moq" Version="4.9.0" />
<PackageReference Include="nunit" Version="3.11.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.11.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Moq" Version="4.20.69" />
<PackageReference Include="nunit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit b59e7bf

Please sign in to comment.