From e7270c37074bc90cbc530a1e55f2dd3e11677614 Mon Sep 17 00:00:00 2001 From: Omar Muscatello <115794104+omar-muscatello-zupit@users.noreply.github.com> Date: Wed, 7 Feb 2024 23:35:15 +0100 Subject: [PATCH] feat: add first pipeline --- .github/workflows/pull-request.yml | 0 .github/workflows/release-common.yml | 35 +++++++++++++++++++ .../workflows/release-version-endpoint.yml | 19 ++++++++++ .../Zupit.VersionEndpoint.TestApp/Program.cs | 0 .../Properties/launchSettings.json | 0 .../Zupit.VersionEndpoint.TestApp.csproj | 0 .../appsettings.json | 0 .../packages.lock.json | 0 .../GlobalUsings.cs | 0 .../VersionEndpointExtensionTests.cs | 0 .../Zupit.VersionEndpoint.Tests.csproj | 0 .../packages.lock.json | 0 .../Zupit.VersionEndpoint/README.md | 0 .../VersionEndpointExtension.cs | 0 .../Zupit.VersionEndpoint.csproj | 0 .../Zupit.VersionEndpoint/packages.lock.json | 0 Zupit.DotNet/Zupit.DotNet.sln | 6 ++-- 17 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/pull-request.yml create mode 100644 .github/workflows/release-common.yml create mode 100644 .github/workflows/release-version-endpoint.yml rename Zupit.DotNet/{ => VersionEndpoint}/Zupit.VersionEndpoint.TestApp/Program.cs (100%) rename Zupit.DotNet/{ => VersionEndpoint}/Zupit.VersionEndpoint.TestApp/Properties/launchSettings.json (100%) rename Zupit.DotNet/{ => VersionEndpoint}/Zupit.VersionEndpoint.TestApp/Zupit.VersionEndpoint.TestApp.csproj (100%) rename Zupit.DotNet/{ => VersionEndpoint}/Zupit.VersionEndpoint.TestApp/appsettings.json (100%) rename Zupit.DotNet/{ => VersionEndpoint}/Zupit.VersionEndpoint.TestApp/packages.lock.json (100%) rename Zupit.DotNet/{ => VersionEndpoint}/Zupit.VersionEndpoint.Tests/GlobalUsings.cs (100%) rename Zupit.DotNet/{ => VersionEndpoint}/Zupit.VersionEndpoint.Tests/VersionEndpointExtensionTests.cs (100%) rename Zupit.DotNet/{ => VersionEndpoint}/Zupit.VersionEndpoint.Tests/Zupit.VersionEndpoint.Tests.csproj (100%) rename Zupit.DotNet/{ => VersionEndpoint}/Zupit.VersionEndpoint.Tests/packages.lock.json (100%) rename Zupit.DotNet/{ => VersionEndpoint}/Zupit.VersionEndpoint/README.md (100%) rename Zupit.DotNet/{ => VersionEndpoint}/Zupit.VersionEndpoint/VersionEndpointExtension.cs (100%) rename Zupit.DotNet/{ => VersionEndpoint}/Zupit.VersionEndpoint/Zupit.VersionEndpoint.csproj (100%) rename Zupit.DotNet/{ => VersionEndpoint}/Zupit.VersionEndpoint/packages.lock.json (100%) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..e69de29 diff --git a/.github/workflows/release-common.yml b/.github/workflows/release-common.yml new file mode 100644 index 0000000..9d0359e --- /dev/null +++ b/.github/workflows/release-common.yml @@ -0,0 +1,35 @@ +name: Release common workflow + +on: + workflow_call: + inputs: + CONTAINER_CI_LABELS: + required: true + type: string + WORKING_DIRECTORY: + required: true + type: string + PROJECT: + required: true + type: string + DOTNET_IMAGE: + required: true + type: string + +jobs: + release: + runs-on: ${{ fromJson(inputs.CONTAINER_CI_LABELS) }} + container: + image: ${{ inputs.DOTNET_IMAGE }} + defaults: + run: + working-directory: ${{ inputs.WORKING_DIRECTORY }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Create NuGet package + run: dotnet pack -c Release -o ./artifacts ${{ inputs.PROJECT }} + + diff --git a/.github/workflows/release-version-endpoint.yml b/.github/workflows/release-version-endpoint.yml new file mode 100644 index 0000000..0b32ee6 --- /dev/null +++ b/.github/workflows/release-version-endpoint.yml @@ -0,0 +1,19 @@ +name: Release version endpoint workflow + +on: + push: + branches: + - main + - release/** + paths: + - Zupit.DotNet/VersionEndpoint/** + workflow_call: + +jobs: + release-versionendpoint: + uses: ./.github/workflows/release-common.yml + with: + CONTAINER_CI_LABELS: "['zupit', 'pipeline', 'container', 'size-large']" + WORKING_DIRECTORY: Zupit.DotNet + PROJECT: 'Zupit.DotNet/VersionEndpoint' + DOTNET_IMAGE: 'mcr.microsoft.com/dotnet/sdk:8.0' diff --git a/Zupit.DotNet/Zupit.VersionEndpoint.TestApp/Program.cs b/Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint.TestApp/Program.cs similarity index 100% rename from Zupit.DotNet/Zupit.VersionEndpoint.TestApp/Program.cs rename to Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint.TestApp/Program.cs diff --git a/Zupit.DotNet/Zupit.VersionEndpoint.TestApp/Properties/launchSettings.json b/Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint.TestApp/Properties/launchSettings.json similarity index 100% rename from Zupit.DotNet/Zupit.VersionEndpoint.TestApp/Properties/launchSettings.json rename to Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint.TestApp/Properties/launchSettings.json diff --git a/Zupit.DotNet/Zupit.VersionEndpoint.TestApp/Zupit.VersionEndpoint.TestApp.csproj b/Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint.TestApp/Zupit.VersionEndpoint.TestApp.csproj similarity index 100% rename from Zupit.DotNet/Zupit.VersionEndpoint.TestApp/Zupit.VersionEndpoint.TestApp.csproj rename to Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint.TestApp/Zupit.VersionEndpoint.TestApp.csproj diff --git a/Zupit.DotNet/Zupit.VersionEndpoint.TestApp/appsettings.json b/Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint.TestApp/appsettings.json similarity index 100% rename from Zupit.DotNet/Zupit.VersionEndpoint.TestApp/appsettings.json rename to Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint.TestApp/appsettings.json diff --git a/Zupit.DotNet/Zupit.VersionEndpoint.TestApp/packages.lock.json b/Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint.TestApp/packages.lock.json similarity index 100% rename from Zupit.DotNet/Zupit.VersionEndpoint.TestApp/packages.lock.json rename to Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint.TestApp/packages.lock.json diff --git a/Zupit.DotNet/Zupit.VersionEndpoint.Tests/GlobalUsings.cs b/Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint.Tests/GlobalUsings.cs similarity index 100% rename from Zupit.DotNet/Zupit.VersionEndpoint.Tests/GlobalUsings.cs rename to Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint.Tests/GlobalUsings.cs diff --git a/Zupit.DotNet/Zupit.VersionEndpoint.Tests/VersionEndpointExtensionTests.cs b/Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint.Tests/VersionEndpointExtensionTests.cs similarity index 100% rename from Zupit.DotNet/Zupit.VersionEndpoint.Tests/VersionEndpointExtensionTests.cs rename to Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint.Tests/VersionEndpointExtensionTests.cs diff --git a/Zupit.DotNet/Zupit.VersionEndpoint.Tests/Zupit.VersionEndpoint.Tests.csproj b/Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint.Tests/Zupit.VersionEndpoint.Tests.csproj similarity index 100% rename from Zupit.DotNet/Zupit.VersionEndpoint.Tests/Zupit.VersionEndpoint.Tests.csproj rename to Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint.Tests/Zupit.VersionEndpoint.Tests.csproj diff --git a/Zupit.DotNet/Zupit.VersionEndpoint.Tests/packages.lock.json b/Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint.Tests/packages.lock.json similarity index 100% rename from Zupit.DotNet/Zupit.VersionEndpoint.Tests/packages.lock.json rename to Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint.Tests/packages.lock.json diff --git a/Zupit.DotNet/Zupit.VersionEndpoint/README.md b/Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint/README.md similarity index 100% rename from Zupit.DotNet/Zupit.VersionEndpoint/README.md rename to Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint/README.md diff --git a/Zupit.DotNet/Zupit.VersionEndpoint/VersionEndpointExtension.cs b/Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint/VersionEndpointExtension.cs similarity index 100% rename from Zupit.DotNet/Zupit.VersionEndpoint/VersionEndpointExtension.cs rename to Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint/VersionEndpointExtension.cs diff --git a/Zupit.DotNet/Zupit.VersionEndpoint/Zupit.VersionEndpoint.csproj b/Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint/Zupit.VersionEndpoint.csproj similarity index 100% rename from Zupit.DotNet/Zupit.VersionEndpoint/Zupit.VersionEndpoint.csproj rename to Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint/Zupit.VersionEndpoint.csproj diff --git a/Zupit.DotNet/Zupit.VersionEndpoint/packages.lock.json b/Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint/packages.lock.json similarity index 100% rename from Zupit.DotNet/Zupit.VersionEndpoint/packages.lock.json rename to Zupit.DotNet/VersionEndpoint/Zupit.VersionEndpoint/packages.lock.json diff --git a/Zupit.DotNet/Zupit.DotNet.sln b/Zupit.DotNet/Zupit.DotNet.sln index c219e10..d5f9cd0 100644 --- a/Zupit.DotNet/Zupit.DotNet.sln +++ b/Zupit.DotNet/Zupit.DotNet.sln @@ -1,12 +1,12 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zupit.VersionEndpoint", "Zupit.VersionEndpoint\Zupit.VersionEndpoint.csproj", "{39181597-C782-4722-A6D6-CFF15A8E3458}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zupit.VersionEndpoint", "VersionEndpoint\Zupit.VersionEndpoint\Zupit.VersionEndpoint.csproj", "{39181597-C782-4722-A6D6-CFF15A8E3458}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "VersionEndpoint", "VersionEndpoint", "{AAF352DC-9F80-4062-B719-B626F421017E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zupit.VersionEndpoint.Tests", "Zupit.VersionEndpoint.Tests\Zupit.VersionEndpoint.Tests.csproj", "{28B19A67-88AF-43E1-939D-0B6F0DC7163B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zupit.VersionEndpoint.Tests", "VersionEndpoint\Zupit.VersionEndpoint.Tests\Zupit.VersionEndpoint.Tests.csproj", "{28B19A67-88AF-43E1-939D-0B6F0DC7163B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zupit.VersionEndpoint.TestApp", "Zupit.VersionEndpoint.TestApp\Zupit.VersionEndpoint.TestApp.csproj", "{BF03B32D-12BD-4086-857D-579B634CC537}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zupit.VersionEndpoint.TestApp", "VersionEndpoint\Zupit.VersionEndpoint.TestApp\Zupit.VersionEndpoint.TestApp.csproj", "{BF03B32D-12BD-4086-857D-579B634CC537}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution