From 2fbf1c1c273e11d1399818d05bce0274758f21b0 Mon Sep 17 00:00:00 2001 From: Ali Yousefi Date: Fri, 12 Jan 2024 18:44:36 +0330 Subject: [PATCH] finalize clean actions --- .github/workflows/dotnet-windows-client.yml | 1 + .github/workflows/dotnet-windows.yml | 7 +++++++ .github/workflows/nuget-push-public-client.yml | 2 ++ .github/workflows/nuget-push-public.yml | 2 ++ 4 files changed, 12 insertions(+) diff --git a/.github/workflows/dotnet-windows-client.yml b/.github/workflows/dotnet-windows-client.yml index b48cbbf..404f32d 100644 --- a/.github/workflows/dotnet-windows-client.yml +++ b/.github/workflows/dotnet-windows-client.yml @@ -35,6 +35,7 @@ jobs: WHITELABEL_PID=$! echo "Started WhiteLabel Service with PID $WHITELABEL_PID" cd .. + shell: bash - name: Restore dependencies run: dotnet restore ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln - name: Build diff --git a/.github/workflows/dotnet-windows.yml b/.github/workflows/dotnet-windows.yml index 558e779..d24f6e7 100644 --- a/.github/workflows/dotnet-windows.yml +++ b/.github/workflows/dotnet-windows.yml @@ -42,3 +42,10 @@ jobs: run: dotnet build ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln --no-restore - name: Test run: dotnet test ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln --no-build --verbosity normal + + - name: Cleanup + if: always() + run: echo "Shutting down Authentication Service with PID $AUTH_PID" + kill $AUTH_PID echo "Authentication Service shutdown failed" + echo "Shutting down WhiteLabel Service with PID $WHITELABEL_PID" + kill $WHITELABEL_PID echo "WhiteLabel Service shutdown failed" \ No newline at end of file diff --git a/.github/workflows/nuget-push-public-client.yml b/.github/workflows/nuget-push-public-client.yml index 726239d..a6d7ba4 100644 --- a/.github/workflows/nuget-push-public-client.yml +++ b/.github/workflows/nuget-push-public-client.yml @@ -30,6 +30,7 @@ jobs: WHITELABEL_PID=$! echo "Started WhiteLabel Service with PID $WHITELABEL_PID" cd .. + shell: bash - name: Restore dependencies run: dotnet restore ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln - name: Build @@ -40,6 +41,7 @@ jobs: run: dotnet pack ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln --output nupkgs - name: Publish the package to NuGet.org run: dotnet nuget push nupkgs\*.nupkg -k ${{secrets.NUGET_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate + - name: Cleanup if: always() run: echo "Shutting down Authentication Service with PID $AUTH_PID" diff --git a/.github/workflows/nuget-push-public.yml b/.github/workflows/nuget-push-public.yml index 120b4f3..0e94039 100644 --- a/.github/workflows/nuget-push-public.yml +++ b/.github/workflows/nuget-push-public.yml @@ -30,6 +30,7 @@ jobs: WHITELABEL_PID=$! echo "Started WhiteLabel Service with PID $WHITELABEL_PID" cd .. + shell: bash - name: Restore dependencies run: dotnet restore ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln - name: Build @@ -40,6 +41,7 @@ jobs: run: dotnet pack ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln --output nupkgs - name: Publish the package to NuGet.org run: dotnet nuget push nupkgs\*.nupkg -k ${{secrets.NUGET_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate + - name: Cleanup if: always() run: echo "Shutting down Authentication Service with PID $AUTH_PID"