diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf0bea2..1ece37a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,9 +8,6 @@ on: - reopened - edited - synchronize - push: - branches: - - master jobs: # Build source code @@ -36,4 +33,5 @@ jobs: # Build the project - name: Build project + if: success() run: dotnet cake build.cake --target=build diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..cd601e7 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,43 @@ +name: Deploy +on: + pull_request: + types: + - closed + +jobs: + # Deploy nuget package when a branch is labeled with `release` and the merge is done to master. + Deploy: + if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release') && github.event.pull_request.base.ref == 'master' + runs-on: ubuntu-latest + strategy: + matrix: + dotnet-version: [8.0.x] + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + # Setup .NET SDK + - name: Set up .NET SDK ${{ matrix.dotnet-version }} + uses: actions/setup-dotnet@v1 + with: + dotnet-version: ${{ matrix.dotnet-version }} + + # Setup cake tool + - name: Setup cake tool + run: dotnet tool install --global Cake.Tool + + # Build the project + - name: Build project + if: success() + run: dotnet cake build.cake --target=build + + # Deploy nuget package + - name: Deploy nuget package + if: success() + env: + NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} + run: | + # Extract nuget package version + NUGET_PKG_VERSION=$(cat NETCore.Keycloak.Client/NETCore.Keycloak.Client.csproj | grep "PackageVersion" | awk -F '>' '{print $2}' | awk -F '<' '{print $1}') + dotnet nuget push NETCore.Keycloak.Client/Release/NETCore.Keycloak.Client.${NUGET_PKG_VERSION}.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json + diff --git a/NETCore.Keycloak.Client/NETCore.Keycloak.Client.csproj b/NETCore.Keycloak.Client/NETCore.Keycloak.Client.csproj index 8870fb1..65e78fe 100644 --- a/NETCore.Keycloak.Client/NETCore.Keycloak.Client.csproj +++ b/NETCore.Keycloak.Client/NETCore.Keycloak.Client.csproj @@ -1,11 +1,20 @@  - + Hasni Mehdi + + A comprehensive .NET Core client library for Keycloak that provides seamless integration with Keycloak's authentication and authorization services. + This library offers a robust implementation of Keycloak's REST API, including support for OpenID Connect, OAuth 2.0, and User-Managed Access (UMA 2.0). + + 1.0.0 + NETCore.Keycloak.Client + keycloak;oauth2;authentication;authorization;openid-connect;oidc;oidc-provider;fapi;fapi-client;user-managed-access;financial-security + black_cockpit.png net6.0;net7.0;net8.0 latest enable disable Library + true NETCore.Keycloak.Client true true @@ -23,5 +32,6 @@ + diff --git a/NETCore.Keycloak.Client/logo.png b/NETCore.Keycloak.Client/black_cockpit.png similarity index 100% rename from NETCore.Keycloak.Client/logo.png rename to NETCore.Keycloak.Client/black_cockpit.png