diff --git a/deployment/ci-cd-license-key.md b/deployment/ci-cd-license-key.md index 71a2b7ec9..7b5cc79d8 100644 --- a/deployment/ci-cd-license-key.md +++ b/deployment/ci-cd-license-key.md @@ -31,25 +31,34 @@ The license activation process in a CI/CD environment involves the following ste The recommended way to provide your license key to the `Telerik.Licensing` NuGet package in CI/CD environment is to use environment variables. Each CI/CD platform has a different process for setting environment variables. This article lists only some of the most popular examples. -### Azure Pipelines (YAML) +### Azure Pipelines -1. Create a new user-defined variable named `TELERIK_LICENSE`. -1. Paste the contents of the license key file as a value. - -### Azure Pipelines (Classic) - -1. Create a new user-defined variable named `TELERIK_LICENSE`. -1. Paste the contents of the license key file as a value. +1. Create a new [user-defined variable](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables) named `TELERIK_LICENSE`, according to your [YAML](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#set-variables-in-pipeline) or [Classic](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=classic%2Cbatch#set-variables-in-pipeline) pipeline setup. +1. Paste the contents of the license key file as a value of the variable. ### GitHub Actions -1. Create a new Repository Secret or an Organization Secret. +1. Create a new [Repository Secret](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository) or an [Organization Secret](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-an-organization). 1. Set the name of the secret to `TELERIK_LICENSE` and paste the contents of the license file as a value. -1. After running `npm install` or `yarn`, add a build step to activate the license: - ````YAML +1. Add a `TELERIK_LICENSE` environment variable to the steps, which build and publish the Blazor app: + ````YAML.skip-repl env: - TELERIK_LICENSE: ${ { secrets.TELERIK_LICENSE } } # remove the spaces between the brackets + TELERIK_LICENSE: ${{ "{{ secrets.TELERIK_LICENSE }}" }} + ```` + The resulting workflow steps may look similar to: + ````YAML.skip-repl + - name: Build Step + run: dotnet build -c Release + env: + TELERIK_NUGET_KEY: ${{ "{{ secrets.TELERIK_NUGET_KEY }}" }} + TELERIK_LICENSE: ${{ "{{ secrets.TELERIK_LICENSE }}" }} + + - name: Publish Step + run: dotnet publish -c Release + env: + TELERIK_LICENSE: ${{ "{{ secrets.TELERIK_LICENSE }}" }} ```` + Also see [Using NuGet Keys](slug:deployment-nuget#using-nuget-keys) in the article [Restoring NuGet Packages in Your CI Workflow](slug:deployment-nuget). It shows how to use the `TELERIK_NUGET_KEY` environment variable in your CI build environment. ### Docker